Hi - sorry if this question seems stupid. Given a lat/lon coordinates, I'd like to known if the point is in a lake, in a forest or on an highway for instance. Nominatim geocoding gives me the nearest node thus it does not really answer my need. What's the right way / tool to use to get that ? Thanks a lot for your help -- david asked 02 Mar '16, 13:23 dmercier90 edited 02 Mar '16, 14:30 |
One Answer:
This is exactly what "query feature" on the http://osm.org/ map does, using Overpass Turbo:
Where you need to replace Also, this will give you enclosing features - so for a highway (which is usually an unclosed way), you wouldn't get a usable result. For that, you may need the other query, "nearby features":
Again, you need to replace Pay attention also to the freshness data returned with results - Overpass uses its own cache, and updates it from the main db; this can sometimes take days, so newest edits may not be returned in the results immediately. answered 02 Mar '16, 14:44 Piskvor edited 02 Mar '16, 16:51 |
Thanks a lot for your fast answer Piskvor !
I'm going to have a look at Overpass, it seems it will help for sure. Btw I didn't found any access to overpass API from http://osm.org, maybe something's missing me or I didn't understand. As far as I know osm.org reverse geocoding is using Nominatim, not Overpass.
Example queries you have provided will be very usefull, thanks again.
Overpass is accessed when you use the "Query features" tool, the "?" at the bottom of the right button bar.
Thanks Maxerickson, I'm going to change my glasses :)
To correct answer, it seems is_in takes (lat,lon), not (lon,lat)
Thanks, good catch! Silly me, edited.