Strange routing - indirect route

Hope this is the correct place to post. Saw that GraphHopper was available on the OSM website so tested it out near me.

Here is the route I have an issue with: https://graphhopper.com/maps/?point=56.057996%2C-3.28577&point=56.048315%2C-3.336239&locale=en-GB&vehicle=car&weighting=fastest&elevation=true&use_miles=false&layer=Omniscale

This seems like an unnecessary detour, which is not suggested by any other routing software I tested (OSRM, Mapzen, Google, Bing). The right turn across traffic, left turn onto the B9157 and then giving way at the roundabout for cars on the busier road surely isn’t faster than continuing on the A921 (albeit at 20 mph)?

Is this a routing issue or is there a problem with the OSM data?

This is indeed strange and the straight way would take 1min longer than the obvious detour. We’ll look into it, thanks for reporting!

The maxspeed tags are indicating the detour is indeed not that much slower and also we are giving inner city a bit penalty. And e.g. Google suggests also something between 5 vs. 6min (although they say the detour is indeed slower). So this result is not soo ‘strange’ :wink: but a real life experience would be interesting.

Here are the maxspeed tags for the detour:

60mph http://www.openstreetmap.org/way/251048636
60mph http://www.openstreetmap.org/way/11652080
30mph http://www.openstreetmap.org/way/417405701

vs.
60mph http://www.openstreetmap.org/way/407994037
20mph for the rest http://www.openstreetmap.org/way/209431595 + http://www.openstreetmap.org/way/435302269 + http://www.openstreetmap.org/way/30453714

And if you want to slightly favour distance reduction you can add ‘&weighting=short_fastest&ch.disable=true’: https://graphhopper.com/maps/?point=56.057996%2C-3.28577&point=56.048315%2C-3.336239&weighting=short_fastest&ch.disable=true

Thanks for the reply. I just find it strange how your router is the only one to suggest the detour!

While the detour might be quicker judging by the maxspeed tags, shouldn’t there be some sort of penalty for having to negotiate three junctions? At least one of them you’ll have to come to a complete stop at - see Google street view:

https://goo.gl/maps/dzSk3Yv3dp92 (crossing road)
https://goo.gl/maps/f3i3Dawmzft (stop sign)
(see next post)

The suggestion to change the url works on the graphhopper demo - however it can’t be done on the OSM website.

continued:
https://goo.gl/maps/mCKtzxn9Gku (roundabout onto busier road)

(sorry, it said new users couldn’t post more than 2 links :stuck_out_tongue: )

The maxspeed tags probably explain this detour as well: https://graphhopper.com/maps/?point=Kinghorn%2C%20United%20Kingdom&point=Aberdour%2C%20United%20Kingdom&locale=en-GB&vehicle=car&weighting=fastest&elevation=true&use_miles=false&layer=Omniscale

Apparently this will take 11 minutes, however no other router thinks it will be that quick! Most of the route is 60 mph, but on the road between Kinghorn and the B9157 you’ll be unlikely to reach that speed as it’s a narrow country road: https://goo.gl/maps/Ki83FhKrncA2

Without actual traffic data (that will come at some point) we have no chance to do this speed guessing always perfectly. You can always help us improve the speed guessing code via contributing the suggested changes, but be warned: this sounds easy but is not :slight_smile:

Maybe in the second example we do give the inner city a too big penalty or are just too fast for the detour. We’ll have to look into it and carefully tune accordingly if possible at all.