I want to implement the shortest path algorithm using the OSM data but i dont know how to get the distance between nodes(http://api.openstreetmap.org/api/0.6/map?bbox=11.54,48.14,11.543,48.145 in this file for example. where is the distance between nodes?) how can i get the distance between nodes using the OSM data? i am newbie using the opensteetmap. thanks in advance. asked 27 Jan '14, 12:18 Kenji Gabriel Frederik Ramm ♦ |
The question has been closed for the following reason "Question is off-topic or not relevant" by Frederik Ramm 27 Jan '14, 12:34
There are several very good routing engines for OpenStreetMap data already. The distance between two locations given in lat,lon coordinates on the Earth's surface is called the "Great Circle Distance" and can be computed using, among others, the so-called Haversine formula. This is not really an OpenStreetMap related question so I'm closing it. answered 27 Jan '14, 12:34 Frederik Ramm ♦ Just to add to that - this page of the beginners' guide explains a bit about the data in OSM (and in the file that you downloaded): http://wiki.openstreetmap.org/wiki/Beginners_Guide_1.3 The distance been points isn't in the file, but their place on the surface of the earth is. In addition, bear in mind that you don't need to use an API call to obtain OSM data - just download one of the extracts linked from this page:
(27 Jan '14, 12:42)
SomeoneElse ♦
|