1

I want to get multiple or alternate routes for a given source and destination from OpenStreetMap like Google Direction API

Currently I am using GraphHopper API for the routing service built on top of OSM. I am getting one route for a given source and destination, but i am interestd in alternates as well, using this GraphHopper API or any Routing Service API that would give me the desired result

Thanks
Riz

Riz
  • 368
  • 4
  • 18
  • 2
    I think [OSRM](http://wiki.openstreetmap.org/wiki/OSRM) does support alternative routes. – tyr Oct 02 '14 at 08:50
  • 1
    [BRouter](http://brouter.de/brouter/) is also capable of computing various different routes. Take a look at the list of [online routers](http://wiki.openstreetmap.org/wiki/Routing/OnlineRouters) for further alternatives. – scai Oct 02 '14 at 12:52
  • BRouter is not really supporting alternative routes, it just skips certain previously used streets which can be achieved with GraphHopper too. Real alternative routes will also come at some point to GraphHopper. – Karussell Oct 02 '14 at 14:56
  • @Karussell Hi, can you please guide me how do I do the skipping part in GraphHopper, it would be of great help – Riz Oct 03 '14 at 08:32
  • @scai does BRouter provides any library/sdk? – Muhammad Babar Oct 03 '14 at 10:56
  • `Graphhopper` is real good as i tried it myself! – Muhammad Babar Oct 03 '14 at 11:00
  • See the custom weighting, where you would fill the set of edge ids from the previous route: https://github.com/graphhopper/graphhopper/blob/master/docs/core/weighting.md – Karussell Oct 03 '14 at 18:54
  • 1
    Also see the fork from Dario: https://github.com/dardin88/graphhopper/tree/alternatives and here: http://dardin88.blogspot.de/2014/07/report-4-graphhopper-alternatives.html Not yet production ready but could be useable as a first step – Karussell Oct 04 '14 at 14:53
  • Discussion on the mailing list https://lists.openstreetmap.org/pipermail/graphhopper/2014-October/001267.html – Karussell Oct 04 '14 at 14:56
  • Thanx @Karussell for the support, will try to implement the Dario's copy and keep you posted. – Riz Oct 13 '14 at 09:29

0 Answers0