NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

1
1

If given a latitude,longitude value, how can I convert this value to an OSM node.

asked 12 Apr '13, 17:07

Sadeer's gravatar image

Sadeer
1768914
accept rate: 0%

edited 13 Apr '13, 00:35

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

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.

(12 Apr '13, 17:12) aseerel4c26 ♦
1

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.

(12 Apr '13, 17:44) SomeoneElse ♦
2

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.

(12 Apr '13, 17:56) Sadeer
2

@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.

(12 Apr '13, 18:04) aseerel4c26 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×535
×305
×205

question asked: 12 Apr '13, 17:07

question was seen: 9,928 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