Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.33k stars 3.34k forks source link

`highway=road` should be excluded from all routing profiles #7039

Open cmoffroad opened 2 days ago

cmoffroad commented 2 days ago

Issue

According to the OpenStreetMap highway=road wiki, roads with an unknown classification should be considered errors and shouldn't be routable.

Currently, on the OSM site, the OSRM demo shows that while the car profile correctly excludes such roads, the foot and bicycle profiles still include them.

Steps to Reproduce

  1. Go to: OSM Directions.
  2. Switch between Bicycle (OSRM), Car (OSRM), and Foot (OSRM) profiles.
  3. Notice that the Bicycle and Foot profiles don't exclude the unknown road between the start and end points, whereas the Car profile does.
1ec5 commented 1 day ago

1980 discusses the justification for omitting highway=road from the car profile, with references to the wiki. (However, that discussion happened before the wiki was modified to contain this warning.) I don’t see any discussion here about highway=road in the foot and bicycle profiles, but there are tests ensuring routability by default:

https://github.com/Project-OSRM/osrm-backend/blob/4f1c62a768120140bae0d2856f3ac0db47e07d72/features/foot/way.feature#L24 https://github.com/Project-OSRM/osrm-backend/blob/4f1c62a768120140bae0d2856f3ac0db47e07d72/features/bicycle/way.feature#L28

If I had to guess, the assumption might be the same as for any other roadway without an explicit foot=*, bicycle=*, sidewalk=*, or cycleway=* tag: that the pedestrian can walk along the side of the road, regardless of the state of the road itself. Similarly, a cyclist can dismount and push their bicycle:

https://github.com/Project-OSRM/osrm-backend/blob/4f1c62a768120140bae0d2856f3ac0db47e07d72/features/bicycle/way.feature#L8

In other words, while the wiki says you shouldn’t expect a router to tell someone to walk on this road, it doesn’t say the router shouldn’t tell them to walk beside the road. This isn’t a very good assumption for highway=road in my opinion, but it probably slipped under the radar because highway=road is so rare in the regions that use OSRM the most.