osrm-backend
osrm-backend copied to clipboard
barrier=kerb causing severe Routing errors on OpenStreetMap
Issue
barrier=kerb on highways is leading to routing errors.
Examples:
-
https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.82970%2C8.77314%3B50.82715%2C8.77159#map=15/50.8329/8.7697
-
https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=51.30117%2C12.39560%3B51.31054%2C12.39732#map=15/51.3056/12.4038
-
https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=48.70970%2C9.15362%3B48.71133%2C9.15267#map=17/48.71189/9.15724
Steps to reproduce
Use the Router "OSRM" on the osm website.
Specifications
Firefox-Browser
Note that none of the other routers on osm (valhalla, graphhopper) are showing this behaviour.
Also note that WIKI is suggesting access=yes as the default.
- https://wiki.openstreetmap.org/wiki/Tag%3Abarrier%3Dkerb
This bug has led to quite a bit of discussion on the German forum.
In my view, failing to route cars over barrier=kerb with kerb=rolled is a clearly a bug in OSRM if we apply the Wiki definition that it's "traversable by large wheeled vehicles, such as cars and bicycles". This should be whitelisted, like kerb=lowered and kerb=flush already are.
It is less clear if it's a bug that OSRM won't route cars over barrier=kerb with kerb=raised. There is some disagreement about this one: where there really is a raised kerb on the road, drivers probably don't want to be routed over it. But the vast majority of barrier=kerb with kerb=raised are tagging errors. Fixing the data will fix all the examples Christian posted. Unfortunately this is not straightforward: the cause of the tagging errors is a bug in iD (related discussion), so we before correct the data, we should fix the bug in iD, otherwise they will just reappear.
It's not just a bug in ID. Some mappers find it okay to tag the kerb-barrier on the crossing node footway/highway. There might also be some QM tools which are indicating nodes with kerb=* without barrier=kerb as an error.
As of #5996, OSRM ignores kerb=* on a highway=crossing node along the roadway and also on a barrier=kerb node with kerb=lowered or kerb=flush. It would be appropriate to apply a small penalty to a kerb=rolled node, similar to a speed bump (#3021), but not to avoid it entirely.
https://github.com/Project-OSRM/osrm-backend/blob/41dda32546399f1dc12af1de41668993de44c7dc/features/car/barrier.feature#L49-L59
I have removed barrier=kerb tags from many of these nodes because there was consensus that they are a data problem.
What is left for OSRM to do? In my view,
barrier=kerb kerb=rolledshould not prevent car routing entirely, a small penalty is appropriate- it is questionable whether
barrier=kerb kerb=raisedshould prevent car routing entirely, perhaps a large penalty would be appropriate?
Blocking: No. Penalty: Yes, but make sure that barrier=kerb is mapped on the actual position of the kerb and not on the crossing with the main road.
Some more examples (after the cleanup).
- https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=53.56243%2C9.90883%3B53.56238%2C9.91002
- https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.59466%2C5.88820%3B50.59423%2C5.88776
- https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=53.45843%2C9.98460%3B53.46052%2C9.98152
- https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=48.14659%2C16.29562%3B48.14755%2C16.29482
- https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=48.81564%2C13.57644%3B48.81522%2C13.57581
- https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=43.31610%2C-1.40310%3B43.31712%2C-1.40388
What is left for OSRM to do? In my view,
barrier=kerb kerb=rolledshould not prevent car routing entirely, a small penalty is appropriateit is questionable whether
barrier=kerb kerb=raisedshould prevent car routing entirely, perhaps a large penalty would be appropriate?
Thanks, I'll see if I can add this.
https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=43.31610%2C-1.40310%3B43.31712%2C-1.40388
I'd be interested to know if we think barrier=kerb is the correct tagging for this. It looks more like the kerb is for a pavement/viewing point, and would only be a barrier if it's used as an overtake location. Bit of a niche situation in any case.
As far as I can see (without testing it), whitelisting kerb=rolled for cars only requires a tiny change in car.lua:
https://github.com/osmuser63783/cbf-routing-profiles/commit/bb0fab01b6b7228557ef851fabdc589dc2768b3f
(Shows here for cbf-routing-profiles, but it should be the same for the profiles in this repo)
I'd be interested to know if we think barrier=kerb is the correct tagging for this. It looks more like the kerb is for a pavement/viewing point, and would only be a barrier if it's used as an overtake location. Bit of a niche situation in any case.
This is the node. Maybe they were trying to say that you have to cross a kerb to access the passing place? Hard to say with certainty, but it's probably not the best way of tagging this.