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

get residential street closest to gps coordinates

0

I'm trying to get a residential road using the reversegeocoding with nominatim. This is what I have constructed

https://nominatim.openstreetmap.org/reverse.php?format=html&lat=47.5&lon=-122&zoom=16&highway=residential

but the road returned is not residential, instead it's classified as "highway:track" how can I get the closest residential road when given gps coordinates?

asked 03 Aug '18, 14:27

Dave4784's gravatar image

Dave4784
16445
accept rate: 0%


One Answer:

1

Nominatim can't do it. It understands a couple of special phrases https://wiki.openstreetmap.org/wiki/Nominatim/Special_Phrases for points-of-interest type searches, but not road types. https://wiki.openstreetmap.org/wiki/Overpass_API might work for your use case.

answered 06 Aug '18, 11:24

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Source code available on GitHub .