-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for routes including ferries? #703
Comments
This is... interesting. I'm guessing you're using the L.Routing.OSRM instance? What I can say is that GraphHopper and Valhalla both find a ferry but they take different ones (you can play around with it here) I'll do some digging in overpass and see if I can find out what exactly causes each of those routing engines to consider a different ferry or in OSRM's case, no ferry at all. My suggestion at the moment would be to use either lrm-graphhopper or lrm-valhalla as a fallback solution. Also, it would be amazing if you could give me some more information about the ferries, as it's possible that the data OSM has on them is slightly wrong (pedestrian only ferry, limited to vehicles < 1t, etc.) and that could impact the routing engines to the point where they make such drastic changes |
Thank you @curtisy1 for replying. I am using the default OSRM instance. I will take a look at one of the other engines. The ferry is a mixed pedestrian/car ferry betwen Norway and Denmark operated by Colorline. The transfer is about three hours. |
The data at Overpass seems to be correct (see here for a simple query). I have no idea what's going on with OSRM or Valhalla there. It might just be an issue on their end with how they calculate the best route. I know Valhalla internally works with penalties/costs, so maybe there is something that makes the ferry in Larvik better for their algorithm (wild guess: it thinks taking the highway is faster than the ferry). As for OSRM, I don't know how they work internally but not taking the ferry into account is almost certainly a bug. I'll open up a discussion about it in their respective repos, for now, the only solution seems to be using either Valhalla or GraphHopper |
I think this might be what's happening with OSRM and possibly with Valhalla as well, depending on how the nodes/ways are tagged in OSM itself. It looks correct to me but something might be off. |
This is not a problem of OSRM in general but the public OSRM demo instance you are using. That one has - due to hardware constraints - a reduced functionality in calculating routes via ferries resulting in a lot of ferry routes not being used. E.g. if you test a route from Kristiansand in Norway to Aalborg in Denmark here: https://fast-routing-api.demo.routingapi.net/ you'll see the ferry being used (and that one is OSRM under the hood as well). But if you use the OSRM demo instance at https://router.project-osrm.org, the ferry line won't be used. |
Can confirm that this works after switching to Graphhopper. |
Hi, thanks for a great addition to Leaflet!
I have stumbled into a wierd issue, the routing machine seems to avoid ferries when calculating routes. How can I fix this?
The text was updated successfully, but these errors were encountered: