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

Overpass Turbo searching in multiple Countries

1

Hi I don't get how I can tell Overpass Turbo that he shall search within more than one country.

Using the wizard for germany only I got this. http://overpass-turbo.eu/s/46G

I tried different thinks but I couldn't figure it out. In the documentation I couldn't find how` to do it, too.

asked 10 Jul '14, 00:51

Hedaja's gravatar image

Hedaja
966611
accept rate: 0%

edited 16 Feb '19, 09:05

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


2 Answers:

8

You can't do this with the built-in query wizard in overpass turbo. But you can combine different areas if you manually tweak the Overpass query:

<!-- fetch area “germany” to search in -->
<id-query {{nominatimArea:germany}} into="area"/>

In your query, this defines the area to search in. Here it is "germany".

Using the <union> statement you can combine multiple such areas into one. (Note that the final result of the union has to be named "area" for the later <area-query>s to work.)

<union into="area">
  <id-query {{nominatimArea:germany}} />
  <id-query {{nominatimArea:austria}} />
  <id-query {{nominatimArea:switzerland}} />
</union>

Here is a working example: http://overpass-turbo.eu/s/46Y

answered 10 Jul '14, 09:18

tyr_asd's gravatar image

tyr_asd
1.2k51927
accept rate: 64%

1

Very nice! If not done yet, will try to add that feature to OSM Wiki.

(10 Jul '14, 19:53) stephan75

0

Try this query: http://overpass-turbo.eu/s/46U this uses the bounding box of the visual area, instead of the fixed area defined by id-query {{nominatimArea:germany and }} into="area"

in your query

answered 10 Jul '14, 06:56

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

2

thanks for you answer. But this isn't useful in this case because I wanted to count the number of charging_stations within Germany,Switzerland and Austria. Using bbox means I would get chargingstations in parts of the Czech Republic and other surrounding countries.

(10 Jul '14, 11:44) Hedaja

Source code available on GitHub .