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

Nominatim return closest way

0

Hi, I'm just wondering if it is possible to only return ways using the reverse geocode method from longitude and latitude.

I'm currently using the query http://nominatim.openstreetmap.org/reverse?format=json&lat=53.3533634&lon=-6.363978&osm_type=W.

This however still returns nodes if that's what the co-ordinates point to.

I was wondering if there is a method for finding the way based on the node id, if this is what gets returned based on the query.

Any help on the matter will be most appreciated. Thanks

asked 13 Dec '16, 00:15

shayD's gravatar image

shayD
16112
accept rate: 0%

Sounds like Overpass API is the better approach here, isn't it?

(13 Dec '16, 07:47) scai ♦

One Answer:

2

Use the zoom parameter. For example http://nominatim.openstreetmap.org/reverse.php?format=html&lat=53.3533634&lon=-6.363978&zoom=16 (you want so change format=html into format=json)

answered 13 Dec '16, 00:56

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

1

Thanks for the quick reply and the answer to the question, works perfect!

(13 Dec '16, 01:07) shayD

Source code available on GitHub .