graphhopper / graphhopper

Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.

Home Page:https://www.graphhopper.com/open-source/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graphhopper takes an indirect route instead of a direct road

RedAuburn opened this issue · comments

Describe the bug
for some reason, graphhopper really doesn't want to route down the main road here. i can't figure out why, there's no reason for it to happen in the OSM data.

To Reproduce
https://graphhopper.com/maps/?point=51.455533%252C0.011588&point=51.464692%252C0.009028&profile=foot

it even tries to leave the main road with an intermediate point lower down:
https://graphhopper.com/maps/?point=51.455533%2C0.011588&point=51.459949%2C0.009851&point=51.464692%2C0.009028&profile=foot

image

expected routing: https://graphhopper.com/maps/?point=51.455533%2C0.011588&point=51.46035%2C0.009776&point=51.464692%2C0.009028&profile=foot

GMaps suggests the correct route, but also offers the indirect route, maybe it's an edge case?

image

We rank highway=secondary slightly down even if these are tagged with sidewalk=both and the maxspeed is smaller compared to 50 km/h. See


And we rank up highway=residential and highway=footway see

As a result we assume that the longer tour is better. Please note that graphhopper is currently not able to rank down the footway along the highway=trunk in case that the footway is mapped separately.

ah i see, thank you for looking into it!

In that case, I'm not sure ranking down highway=secondary sidewalks is a good idea, in the UK, the high-street is often highway=secondary or above, and this rule might lead to strange routing.
TBH i don't think highway=* tags should be used to guess the level of safety for pedestrians (although it does make sense in places like the US where it could actually be very dangerous)

The issue seems to be fixed via the data update you did.

TBH i don't think highway=* tags should be used to guess the level of safety for pedestrians

In a European city you are probably right as one can often assume that the data is not properly tagged in these cases but not always and also not for other countries or outer city. In such a case the assumption regarding safety vs. highway "level". You can create a new issue if you like.