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
  •  | 
  •  

문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top