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 |
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 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.
(02 Mar '16, 15:00)
dmercier90
3
Overpass is accessed when you use the "Query features" tool, the "?" at the bottom of the right button bar.
(02 Mar '16, 15:11)
maxerickson
Thanks Maxerickson, I'm going to change my glasses :)
(02 Mar '16, 15:24)
dmercier90
To correct answer, it seems is_in takes (lat,lon), not (lon,lat)
(02 Mar '16, 16:27)
dmercier90
Thanks, good catch! Silly me, edited.
(02 Mar '16, 16:49)
Piskvor
|