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

Limiting overpass turbo query by postal_code and country/city

0
1

I'd like to limit a query (for highways) by postal_code and country (since the postal_codes are only unique on a national level).

Let's say that is my query:

area[postal_code="19300"]->.searchArea;
area.searchArea[name="Germany"];
way(area.searchArea)[highway][name];
(._;>;);
out;

http://overpass-turbo.eu/s/QeG

By that I get highways in Germany and in France.

I thought about something like

area.searchArea[name="Germany"].->searchArea2;
way(area.searchArea2)[highway][name];

But this doesn't work.

What would be the correct syntax?

Or how could I link something like

{{geocodeArea:Germany}}

to this kind of query?

Thanks!

asked 30 Jan '20, 14:04

entenbein's gravatar image

entenbein
21112
accept rate: 0%

Yeah, that one solved it!

(30 Jan '20, 14:57) entenbein

One Answer:

0

answered 30 Jan '20, 14:58

entenbein's gravatar image

entenbein
21112
accept rate: 0%

Source code available on GitHub .