Add rising bollard exception to barriers for car profile.
This handles `barrier=bollard` with `bollard=rising`, by making an
exception to the barrier whitelist. Barriers tagged as such do no longer
require an explicit access tag.
This also adds corresponding tests, check this out:
cucumber --tags @barrier
References:
- http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dbollard
- http://wiki.openstreetmap.org/wiki/Key:bollard
- https://github.com/Project-OSRM/osrm-backend/issues/1616
This commit is contained in:
+5
-1
@@ -195,7 +195,11 @@ function node_function (node, result)
|
||||
else
|
||||
local barrier = node:get_value_by_key("barrier")
|
||||
if barrier and "" ~= barrier then
|
||||
if not barrier_whitelist[barrier] then
|
||||
-- make an exception for rising bollard barriers
|
||||
local bollard = node:get_value_by_key("bollard")
|
||||
local rising_bollard = bollard and "rising" == bollard
|
||||
|
||||
if not barrier_whitelist[barrier] and not rising_bollard then
|
||||
result.barrier = true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user