If given a latitude,longitude value, how can I convert this value to an OSM node. asked 12 Apr '13, 17:07 Sadeer aseerel4c26 ♦ |
NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum
If given a latitude,longitude value, how can I convert this value to an OSM node. asked 12 Apr '13, 17:07 Sadeer aseerel4c26 ♦ |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Question tags:
question asked: 12 Apr '13, 17:07
question was seen: 10,080 times
last updated: 13 Apr '13, 00:35
NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum
That's similar to reverse geocoding but apparently it is not possible to return a node with Nominatim, if I see correctly. Maybe with XAPI or overpass API.
Do you mean "any sort of node at all" or "a node with particular tags"? Not that it makes much of a difference technically, but it might help people imagine what you're trying to do.
I'm building a route planning system: users will be able to click on a map to set their starting/destination places. A route will then be found between the given locations. Currently, I'm using Leaflet to allow users to set these places, and what it returns is lat/lon value when the user clicks on the map. Now, I'm trying to resolve the returned lat/lon values to the closest osm nodes which are part of some osm way.
Hope that makes sense.
@Sadeer: may it be that you are actually not looking for the closest node (which is part of "some osm way") but instead of the closest point on a way which is tagged with highway=whatever? I strongly think that you should have a look in the existing open source routing solutions for ideas or even code fragments (if the license is compatible). No reason to reinvent the wheel.