Good afternoon! Does the OSM have an API method for obtaining the nearest settlement to the specified coordinates? The method for reverse geocoding returns only the exact address of the object with the given coordinates:https://nominatim.openstreetmap.org/reverse The problem arises when the given coordinates do not have a specific locality, but the region is very large. Thank you in advance. asked 30 May '18, 08:25 Helen Kir |
The focus of OSM is providing data - not so much providing data access APIs. It is possible that you could do something with Overpass that gets you halfway there, but if you need to make these kinds of queries often, it would be a good idea to
Since you're only interested in a fraction of OSM data, you shouldn't need too much disk space or memory for this, and you'll be able to make fast queries. answered 30 May '18, 10:10 Frederik Ramm ♦ |
With Nominatim you can try the &zoom parameter. Default is trying to find an exact address (house number) 18. With 2 it looks just for the country. You can see the possible values in the dropdown field on https://nominatim.openstreetmap.org/reverse.php?format=html&lat=35.62534009803395&lon=-95.48938751220705&zoom=12 answered 30 May '18, 10:47 mtmail |