-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Makes construction=minor ways routable again, see #4258 #4306
Conversation
profiles/lib/way_handlers.lua
Outdated
@@ -521,7 +521,7 @@ function WayHandlers.blocked_ways(profile,way,result,data) | |||
local construction = way:get_value_by_key('construction') | |||
|
|||
-- Of course there are negative tags to handle, too | |||
if construction and construction ~= 'no' and construction ~= 'widening' then | |||
if construction and construction ~= 'no' and construction ~= 'widening' and construction ~= 'minor' then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about doing an explicit check for the tags we wan't to block from routing? Otherwise we might just end up excluding another strange tag we might not yet even know about/that is introduced in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this is a good idea in practice osm allows for
The value of the construction=* key should be one of those defined bellow and indicates the type of feature being built (you can use any value from from highway=*, railway=* and building=*).
so unless we want to hard-code all of those values I think we're good for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also from the OSM wiki as a side-note.
Unclassified road under construction (alternatively tag construction=minor)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could check for https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L143-L156 or some similar list, right? That would avoid hardcoding more strings there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capturing from chat: I was under the misconception that this tagging scheme would try to parse highway=construction and construction=highway_type
. I am fine with this change for the special cases to handle deprecated tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be cool however is a whitelist in the profile table. Then you could do:
if construction and not profile.construction_whitelist[construction] then
...
end
Updated - please have a look again. |
@@ -57,6 +57,8 @@ function setup() | |||
|
|||
restricted_highway_whitelist = Set { }, | |||
|
|||
construction_whitelist = Set {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not needed, since avoid construction is not activated in the foot profile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Please cherry-pick to the 5.9
branch after Travis gives 💚 .
Ah, thanks for cherry picking and running this out 🙇 |
In #4258 we removed construction tags except for
construction=widening
andconstruction=no
.Turns out we missed
construction=minor
in the list of 3804 unique construction values.This affects 1194 ways on the planet.