This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Using OSM for calculating distance in desktop application using java

0

I would like make a simple desktop application that can calculate the distance between two cities given by the user. I know that there is no practical purpose for this but I would just like to build it as a programming exercise. I'm having a hard time however with finding the right documentation for this. I would like to do this through an API request and it should be street level routing.

Is there anybody that could help me out here by pointing me in the right direction?

Thanks in advance.

asked 25 Sep '16, 15:04

Tezen's gravatar image

Tezen
16114
accept rate: 0%

edited 28 Sep '16, 14:37

1

Please EDIT your question and tell us whether you want to have the needed routing data via online download / API request ... or via offline map files on your PC / device ... and then: do you want to know direct lien connection, or street level routing?

(27 Sep '16, 20:39) stephan75

One Answer:

2

You should have a look at the OSM wiki about Routing and its sub-page about online routing

Please try each online service listed there, and evaluate yourself whether the user interface comes near your aim, or that you can do some coding for your own.

Also pay attention to the age of each routing database ... some are outdated.

answered 28 Sep '16, 18:45

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

Source code available on GitHub .
OSZAR »