Openstreetmap how to get the shortest travel distance by car between multiple points and a target

StackOverflow https://stackoverflow.com/questions/13481599

  •  30-11-2021
  •  | 
  •  

Question

i need to know the shortest distance (traveling by car on the map, not bird view) between let's say 10 GIS points and a target with possibly CloudMade or something else.

The points are within 10 kilometers.

So I need a way to know out of my 10 positions, which one is the closest to my target, that is travelling by car, not bird view.

thanks

Was it helpful?

Solution

You don't say if you're developing a web app, an offline app, or something else. In general, you'll need to use a routing service, or routing code - see, for example, MapQuest's web APIs or Project OSRM's code.

Then do a query for each and compare the distances. There aren't generally services that answer the question "which of these POIs is nearest?" AFAIK, so this is probably the most effective way to find which-is-nearest.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top