I have a overpass query which returns lot of nodes. I would like to know whether there is a way to add reverse geocoding information to the resulting data set. Details of my case are not that important, but just for completness:
in fact i do not need full reverse geocoding info for nodes, I only need relation of certain administrative level, so if this is possible to add into the result set, it would be great. PS: I know that I can read the result set and then reverse geocode each individual node, but it seems very inefficient to me. asked 19 Aug '14, 01:55 gorn edited 19 Aug '14, 10:55 SimonPoole ♦ |
3 Answers:
Please have a look at http://overpass-turbo.eu/s/4EF The foreach loop enables you to get the areas a node lies in right after each node. answered 20 Aug '14, 08:04 Roland Olbricht edited 20 Aug '14, 18:16 |
Have a look for "batch geocoding" or "batch reverse geocoder" or similar on this FAQ site. Or have a closer look at the OSM wiki about Search engines ... maybe there is a solution for your aim. answered 19 Aug '14, 16:09 stephan75 |
For anyone arriving from a Google search:
answered 23 Jul '22, 23:21 DaveF |
To avoid retrieving the same area details many times, you could just return the area id in a first API call and retrieve the missing area details in a second query call for each distinct area id returned by the first query.
After the signpost node, you would just get the following detail from the first query:
<area id="3600435511"/> <area id="3600442466"/>
In a second query you could fetch the more details for those area ids: (area(3600435511);area(3600442466););out;
This could save some bandwidth on your end.
http://overpass-turbo.eu/s/4Fo
Execllent idea!
On top of this, you could even avoid to ask for a list of ids:
http://overpass-turbo.eu/s/4FJ