-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Wrong car routing through motor_vehicle=delivery #2150
Comments
Thank you for reporting this. I looked into it and this is what I found: If you take a look at the car profile you can see If you take a look at the |
I just tried and learned OSRM also routes through roads with I've read the car profile lua code (which I only skimmed through before writing this issue) and conclude that
I don't understand what "to augment the route response e.g. for guidance" means. So in my opinion the following patch (untested) might fix this issue as long as restricted access is not implemented (at least from what I currently think diff --git a/profiles/car.lua b/profiles/car.lua
index f6bfd23..8e0fd74 100644
--- a/profiles/car.lua
+++ b/profiles/car.lua
@@ -5,7 +5,7 @@ local find_access_tag = require("lib/access").find_access_tag
-- Begin of globals
barrier_whitelist = { ["cattle_grid"] = true, ["border_control"] = true, ["checkpoint"] = true, ["toll_booth"] = true, ["sally_port"] = true, ["gate"] = true, ["lift_gate"] = true, ["no"] = true, ["entrance"] = true }
access_tag_whitelist = { ["yes"] = true, ["motorcar"] = true, ["motor_vehicle"] = true, ["vehicle"] = true, ["permissive"] = true, ["designated"] = true, ["destination"] = true }
-access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestry"] = true, ["emergency"] = true, ["psv"] = true }
+access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestry"] = true, ["emergency"] = true, ["psv"] = true, ["delivery"] = true }
access_tag_restricted = { ["destination"] = true, ["delivery"] = true }
access_tags = { "motorcar", "motor_vehicle", "vehicle" }
access_tags_hierachy = { "motorcar", "motor_vehicle", "vehicle", "access" } |
In case we have to route you over those, we want to notify you about it in the user interface / the instructions. The I had to take a deeper look at the profiles myself, so here's a guided tour through the car profile: The find_access_tag function takes a node or a way and checks if there are values for the keys: "motorcar", "motor_vehicle", "vehicle", "access" as listed in the For nodes we check if the value is in the For ways we check if the value is in the Your proposed change therefore effects the following nodes and ways: http://taginfo.openstreetmap.org/tags/motorcar=delivery Which looks fine to me for preventing routing over delivery-only nodes or ways. I will create a pull request with your changes and let @TheMarex take a final look. |
See http://map.project-osrm.org/?z=17¢er=49.318213%2C8.572083&loc=49.316863%2C8.575462&loc=49.316517%2C8.574700&hl=en&alt=0
The two streets connecting each service area with the street over the motorway are tagged with motor_vehicle=delivery, so they shouldn't be used.
Further info:
https://lists.openstreetmap.org/pipermail/talk/2016-February/075526.html
See also @Fujnky's comment on issue #256 illustrating a similar problem.
The text was updated successfully, but these errors were encountered: