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

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%20Gabriel's gravatar image

Kenji Gabriel
-1334
accept rate: 0%

closed 27 Jan '14, 12:34

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273

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.

permanent link

answered 27 Jan '14, 12:34

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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:

http://planet.openstreetmap.org/

(27 Jan '14, 12:42) SomeoneElse ♦

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
×305
×290
×92

question asked: 27 Jan '14, 12:18

question was seen: 6,287 times

last updated: 27 Jan '14, 12:42

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