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

Driving car distance between two coordinates

0

Hi

Please help me making a query towards Overpass API. As input I'd like to give two coordinates and as output I'd like to get driving distance.

cURL example would be much appreciated, but anything goes.

asked 14 Aug '21, 11:48

Ehitajah2rra's gravatar image

Ehitajah2rra
16112
accept rate: 0%


One Answer:

2

Overpass cannot do that. You need a routing engine like Graphhopper or OSRM. You can install these programs on your own server(s) if you need to make a lot of requests, but if you're just making a few you can use the free public instances. For OSRM, see http://project-osrm.org/docs/v5.24.0/api/# which has working curl examples. For Graphhopper, see https://graphhopper.com/

answered 14 Aug '21, 12:40

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thank You so much!

(14 Aug '21, 13:40) Ehitajah2rra

Source code available on GitHub .