This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

optimising overpass API QL request

0

Hello everyone, the query below works. I would have liked to optimize it so as to accelerate the result. Can you help me ? Thank you in advance. Mathieu

http://overpass.mydevicexxx.com/api/interpreter?data=[out:json][timeout:25];(node(around:1000,48.84203354,2.790979589)["name"~"."]["amenity"="parking"]->.b;node(around:1000,48.84203354,2.790979589)["name"~"."]["amenity"="school"]->.c;node(around:500,48.84203354,2.790979589)["name"~"."]["amenity"="townhall"]->.d;way(around:500,48.84203354,2.790979589)["name"~"."]["amenity"="townhall"]->.d;relation(around:500,48.84203354,2.790979589)["name"~"."]["amenity"="townhall"]->.d;node(around:500,48.84203354,2.790979589)["name"~"."]["railway"="subway_entrance"]->.f;node(around:500,48.84203354,2.790979589)["name"~"."]["railway"="tram_stop"]->.g;node(around:1000,48.84203354,2.790979589)["name"~"."]["tourism"="museum"]->.h;node(around:500,48.84203354,2.790979589)["name"~"."]["highway"="bus_stop"]->.j;node(around:500,48.84203354,2.790979589)["name"~"."]["leisure"="park"]->.k;way(around:500,48.84203354,2.790979589)["name"~"."]["leisure"="park"]->.k;relation(around:500,48.84203354,2.790979589)["name"~"."]["leisure"="park"]->.k;);.b out qt tags 1;>;.c out qt tags 1;>;.d out qt tags 1;>;.f out qt tags 1;>;.g out qt tags 1;>;.h out qt tags 1;>;.j out qt tags 1;>;.k out qt tags 1;

asked 01 Aug '17, 18:24

mdk83's gravatar image

mdk83
25224
accept rate: 0%

edited 02 Aug '17, 07:41

scai's gravatar image

scai ♦
33.3k21309459

You can already simplify your query a bit by using "|" in queries, which acts like "a or b" -> "a|b", and "~" (tilde) instead of "=". For example: ["amenity"~"parking|school"] -- Not sure how much that will speed up the process though and what your desired result should look like.

(01 Aug '17, 20:52) chrki