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

How to get the city and the country of every osm type?

0

Hello, i want to collect all points that have "amenity=school" as tag and i created the following raw data URL:

http://overpass-api.de/api/interpreter?data=[out:json];(node[amenity=school];>;way[amenity=school];>;relation[amenity=school];>;);out;

Since not all the points have address tags, is it possibile to combine the Nominatim's reverse geocoding capabilities with the overpass-api query to get all the points with related city and country?

asked 19 Nov '15, 08:18

Andreanovenove's gravatar image

Andreanovenove
126101118
accept rate: 0%


One Answer:

1

I am not 100% but I think that overpassAPI and overpass-turbo cannot deliver any reverse geocoding.

So you need an own solution, either by Nominatim, or by anothzer search engine or framework ... see Search_engines

Also do a search on this FAQ site for "bulk geocoding" and "reverse geocoding".

This answer is marked "community wiki".

answered 19 Nov '15, 16:38

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

The is_in query acts as a reverse geocode, but there is not an Overpass operator to mark up the input items with the geocoding results, it would have to be used in a manner similar to nominatim.

(19 Nov '15, 17:21) maxerickson

Source code available on GitHub .