OSRM suggested route differs from Valhalla/Grasshopper

I have been working on improving the features of a small area (previous question here).

I constantly test for routability during edits to make sure that the footpaths I was adding were being linked correctly and usable for routing suggestions.

This is Valhalla (and also Grasshopper) routing for two arbitary points (on foot), which is optimal in my view -

This is OSRM (Foot), which is incorrect.

I don’t know if this is relevant, but if I move the start point a little closer, then OSRM also suggests the intended route. There seems to be some tipping point at which OSRM switches to taking the longer route, but I can’t figure out why. The footpath link has been redrawn, and has identical attributes from start to finish point.

Is there anything specific that could be causing this anomaly? Perhaps an issue with how the footpaths have been drawn?

As you can see in your screenshoots OSRM handles the way at your startpoint at not accessable for pedestrians. This is the reason for the large detour.

Would be helpful to have a link to this routes to have an fast access to the tags of the ways.

you did some changes to access in the last days.

keep in mind that it takes some days until the router update its graph.

the access-tagging is not consistent.
Is it a footway or a multi-purpose path or a track? (i guess path is suitable here)
motor_vehicle=unknown? if motor_vehicle are allowed, then it is not a footway.
access=yes/permissive opens it for all kinds of traffic. If you want to describe the access for pedestrians use (only) foot=* instead

highway=path
bicycle=yes (or permissive?)
foot=yes (or permissive?)
surface=unpaved
width=1.5

If your edits were recently note that the routers don’t update their graphs instantly. For example OSMR is currently using data as of 2024-12-12T05:00:00Z for foot routing in Asia and Europe

4 Likes

This would explain the behaviour: The way does still not exist in the routing graph

The way is not updated in the graph see debug-map:
https://map.project-osrm.org/debug/foot.html#16.36/6.83521/79.90310
image
(way is not connected here)

or find it out by not being able to start your route there
OpenStreetMap

1 Like

Thus likely an after effect of the moving of the server on question on the 12th, I’ve pointed the issue out to the team that runs it (seems as if the problem actually doesn’t have anything directly to do with the move, just with the routing graphs getting larger and larger).

2 Likes