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

Dears, could you please inform me if there are an Api that can give us the distance between A and B using API? Like Google Distance Matrix API.

Thanks.

asked 22 Oct '14, 12:27

Danil%20Rudakov's gravatar image

Danil Rudakov
46113
accept rate: 0%

Hi guys,

I would like to do the same as the question ask, but is it free ?

(21 Aug '21, 09:56) hunae

Yes, OSRM (Open Source Routing Machine) provides this feature - both for point-to-point queries and for matrices.

See https://github.com/Project-OSRM/osrm-backend/wiki/Server-api. There is a public instance at router.project-osrm.org which is available for light usage within the terms of use (see the OSRM wiki). An example matrix call would be:

http://router.project-osrm.org/table?loc=29.94,-90.11&loc=30.44,-91.18&loc=30.45,-91.22&loc=30.42,-91.15

If you have more significant needs, you can set up your own instance of OSRM.

permanent link

answered 22 Oct '14, 12:48

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

edited 22 Oct '14, 12:49

This sounds interesting, is this p2p only? How about for matrices, i.e. m2m? Also, is this using geo coords only? Is there support for addresses? Or a way to identify the geo coords for an address? Thank you...

(31 Aug '20, 15:27) mwpowelllde

There is also the GraphHopper Directions API based on OSM data with a Matrix API providing times and distances. (Note: I'm the author of GraphHopper)

permanent link

answered 26 Mar '15, 21:50

peatar's gravatar image

peatar
3512312
accept rate: 8%

edited 29 Jun '16, 09:15

Dislaimer: I work for iGeolise

The TravelTime API can be used to calculate the true distance from A to B (rather than as the crow flies) as well as calculating the travel time between the two points (plus lots more). Sign up for an API key here.

permanent link

answered 16 Jun '16, 10:37

Louisa-maps's gravatar image

Louisa-maps
311
accept rate: 0%

Is the map data based on OSM?

(16 Jun '16, 11:37) scai ♦

as far as i found OSRM only provides a travel-time-matrix (although they call it distance matrix). if i am wrong, please post, because i am looking for distance matrices

permanent link

answered 29 Jun '16, 08:30

gemerden's gravatar image

gemerden
1
accept rate: 0%

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:

×290
×63
×5

question asked: 22 Oct '14, 12:27

question was seen: 101,543 times

last updated: 21 Aug '21, 10:42

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