Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need a routing service with an API callable from a web or desktop application. I have several points: a start, an end, and intermediate points in the disorder. I expect the routing service to send me the shortest path between the start and the end, via every intermediate point. Do you know such a service ?

share|improve this question

2 Answers 2

OSRM has an routing API that can do that. You can find the documentation for the API here. But you have to put them in the order of appearance beforehand.

To route via certain coordinates list them in the query string in the order of appearance (currently limited to 25 max points and to vehicle routing only):

http://router.project-osrm.org/viaroute?loc=lat1,lon1&loc=lat2,lon2&loc=lat3,lon3&loc=lat4,lon4&...&latX,lonX

Please have a look at the API Usage Policy before you use it.

share|improve this answer
1  
Thanks for this reply. I just tried, but the result is the route between every point, in the order they are specified in the URL. I also tried the OpenRouteService.org API and the result is the same. I need a router which find a path going through each point in the best order. –  superrache Feb 27 at 16:27
    
Yeah that's right. Like I said you have to but them in order beforehand. Sorry that this doesn't help. –  ustroetz Feb 27 at 16:34
up vote 1 down vote accepted

MapQuest Open Directions API Web Service has an "Optimized routing" feature:

All the power of the routing function, plus we'll re-order the stops for you to provide the most efficient route to get to all your stops. Great for planning out the best way to get round multiple places you need to visit in a single journey.

There is also Google Directions API, in which you have to specify both origin and destination points, more waypoints with the "optimize:true" option to get the best waypoint order.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.