Project-OSRM / osrm-backend

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

barrier=kerb causing severe Routing errors on OpenStreetMap #6582

Open c-h-r-i-s-t-i-a-n opened 1 year ago

c-h-r-i-s-t-i-a-n commented 1 year ago

Issue

barrier=kerb on highways is leading to routing errors.

Examples:

Steps to reproduce

Use the Router "OSRM" on the osm website.

Specifications

Firefox-Browser

c-h-r-i-s-t-i-a-n commented 1 year ago

Note that none of the other routers on osm (valhalla, graphhopper) are showing this behaviour.

c-h-r-i-s-t-i-a-n commented 1 year ago

Also note that WIKI is suggesting access=yes as the default.

osmuser63783 commented 1 year ago

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.

c-h-r-i-s-t-i-a-n commented 1 year ago

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.

1ec5 commented 1 year ago

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

osmuser63783 commented 1 year ago

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,

c-h-r-i-s-t-i-a-n commented 1 year ago

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.

c-h-r-i-s-t-i-a-n commented 1 year ago

Some more examples (after the cleanup).

mjjbell commented 1 year ago

What is left for OSRM to do? In my view,

  • barrier=kerb kerb=rolled should not prevent car routing entirely, a small penalty is appropriate

  • it is questionable whether barrier=kerb kerb=raised should 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.

osmuser63783 commented 9 months ago

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.