osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Path with "mountain_hiking" creates weird snapping on foot profile

Open jeabapLANG opened this issue 2 years ago • 11 comments

Hi When trying to connect two dots together OSM create a completely different path than the requested one (a much longer path than the original one).

I can't understand where this error can come from and have already tried different ways to remove it without success... I also looked and the path seems to exist in the OpenStreetMap data.

If anyone has any idea what the problem might be, I really need help! Thanks in advance ;)

image

jeabapLANG avatar May 03 '23 14:05 jeabapLANG

To test this issue :

Here is the road I obtain from OSRM : https://map.project-osrm.org/?z=18&center=49.449513%2C6.355011&loc=49.448922%2C6.355993&loc=49.448702%2C6.355703&hl=en&alt=0&srv=2

image

Here is the road I wanted (approx due to snapping) : https://map.project-osrm.org/?z=18&center=49.448770%2C6.355800&loc=49.448908%2C6.355988&loc=49.448702%2C6.355703&hl=en&alt=0&srv=2

image

jeabapLANG avatar May 03 '23 14:05 jeabapLANG

best to add the URL to the way in question on https://openstreetmap.org, so we can see the tags

nilsnolde avatar May 03 '23 14:05 nilsnolde

I'll do it right away ;) Thx for your holy **** fast response

jeabapLANG avatar May 03 '23 14:05 jeabapLANG

Here is the result for OSRM (Foot) : https://www.openstreetmap.org/directions?engine=fossgis_osrm_foot&route=49.44890%2C6.35594%3B49.44865%2C6.35562#map=19/49.44892/6.35566

image

And here is the result for GraphHopper (Foot) : https://www.openstreetmap.org/directions?engine=graphhopper_foot&route=49.44890%2C6.35594%3B49.44865%2C6.35562#map=19/49.44879/6.35577

image

And really strange thing by GraphHopper it seems to work but by OSRM a big NOPE 🤔

jeabapLANG avatar May 03 '23 14:05 jeabapLANG

As said above, what could potentially cause an error like this?

@nilsnolde 😊

jeabapLANG avatar May 03 '23 14:05 jeabapLANG

Works for me for all routing engines on foot & bicycle: https://www.openstreetmap.org/directions?engine=fossgis_valhalla_bicycle&route=49.44889%2C6.35592%3B49.44868%2C6.35546#map=19/49.44878/6.35572.

Car routing is obviously not possible there. You didn't mention which mode you want to use? I assume bike?

You need to look at the tags of the way(s), e.g. this one has explicit bike access. The only way how this would not be routable is if the router decided the highway=path is not bike-routable, but neither OSRM nor the others (rightfully) think so.

nilsnolde avatar May 04 '23 10:05 nilsnolde

I was using the foot mode and when foot is selected OSRM creates an alternative path because the exact part mentioned above is not recognized as having a foot access

jeabapLANG avatar May 04 '23 10:05 jeabapLANG

Did you try the link I put there and change it to OSRM? It finds the way. If that's not what you want (though it's pretty exactly the route you were first posting), we need the URL of the way.

I did notice you're using deprecated OSRM API URLs, it's hosted at https://routing.openstreetmap.de/ since a long time. Not sure if they're just linked by redirects, still better to use those URLs (e.g. look in the network tab when using osm.org).

nilsnolde avatar May 04 '23 10:05 nilsnolde

I just double-checked but I think you got it wrong/took the right route.

As I explained above (see pictures), OSRM does not completely connect the path and if the point is placed slightly higher, it creates a huge detour. GraphHopper on the other hand manages to completely connect the two points no matter where they are located and does not create any detours (ref pictures above).

jeabapLANG avatar May 04 '23 10:05 jeabapLANG

Ok, this is the way: openstreetmap.org/way/203219837. It has sac_scale=mountain_hiking and seems OSRM doesn't like that. Nothing you can do other than PRing a fix to the foot.lua.

nilsnolde avatar May 04 '23 10:05 nilsnolde

Seems like this is a feature, not a bug, it was discussed here: https://github.com/fossgis-routing-server/cbf-routing-profiles/issues/9

The default foot profile used by by openstreetmap.org simply avoids any paths with sac_scale=mountain_hiking or higher, and this way is tagged mountain_hiking.

osmuser63783 avatar Jan 08 '24 17:01 osmuser63783

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.

github-actions[bot] avatar Jul 07 '24 16:07 github-actions[bot]