Why not ask your question on the new 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
accept rate: 0%

closed 27 Jan '14, 12:34

Frederik%20Ramm's gravatar image

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.

permanent link

answered 27 Jan '14, 12:34

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
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):


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 ♦

Follow this question

By Email:

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



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:


question asked: 27 Jan '14, 12:18

question was seen: 5,774 times

last updated: 27 Jan '14, 12:42

powered by OSQA