Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of barrier=kerb blocking routing on major highways #5996

Closed
mjjbell opened this issue Mar 28, 2021 · 2 comments · Fixed by #5999
Closed

Use of barrier=kerb blocking routing on major highways #5996

mjjbell opened this issue Mar 28, 2021 · 2 comments · Fixed by #5999

Comments

@mjjbell
Copy link
Member

mjjbell commented Mar 28, 2021

Whilst debugging a routing issue using the default car.lua profile, I determined the cause was the use of the barrier=kerb tag on a node that is part of a major road. I believe the intention is for the barrier tag to describe the highway crossing, not the highway itself.

Here's an example:
image
node

image
diverted route

barrier=kerb is not included in the whitelist for the default car profile - the OSM guidelines treat the use of this tag for a highway crossing as a mistake.

However, it appears its usage is quite widespread, which leads me to believe a one-off correction would not prevent these from being recreated.

Whilst this is not specifically an OSRM issue and can be fixed with profile changes, it does raise the issue of how the profile can be more resilient to OSM tagging mistakes.

Related

There have been previous discussions around this topic.
#5067 - Routing over barrier=kerb may make sense over small private roads, e.g. driveways.
#3890 - Discusses changing whitelists to blacklists to deal with unexpected tags. This was applied for foot and bicycle profiles. The suggestion is this could also be applied to major highways for cars, where the list of applicable barriers is stable.

@danpat
Copy link
Member

danpat commented Mar 28, 2021

This is something we've adjusted on our internal deployment and I forgot to push back into the main repo. Our diff looks like this:

diff --git a/profiles/car.lua b/profiles/car.lua
--- a/profiles/car.lua
+++ b/profiles/car.lua
@@ -361,7 +360,11 @@ function process_node(profile, node, result, relations)
       local bollard = node:get_value_by_key("bollard")
       local rising_bollard = bollard and "rising" == bollard

-      if not profile.barrier_whitelist[barrier] and not rising_bollard or restricted_by_height then
+      -- make an exception for lowered/flat barrier=kerb
+      local kerb = node:get_value_by_key("kerb")
+      local flat_kerb = kerb and ("lowered" == kerb or "flush" == kerb)
+
+      if not profile.barrier_whitelist[barrier] and not rising_bollard and not flat_kerb or restricted_by_height then
         result.barrier = true
       end
     end

@mjjbell
Copy link
Member Author

mjjbell commented Mar 30, 2021

Made #5999 to add this.
Also included an additional clause for highway=crossing tags as there are still some barriers that the above change doesn't catch, including the example above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants