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:
parent
3e8ef5e462
commit
db30836b53
@ -37,3 +37,10 @@ Feature: Car - Barriers
|
||||
| wall | no | |
|
||||
| wall | private | |
|
||||
| wall | agricultural | |
|
||||
|
||||
Scenario: Car - Rising bollard exception for barriers
|
||||
Then routability should be
|
||||
| node/barrier | node/bollard | bothw |
|
||||
| bollard | | |
|
||||
| bollard | rising | x |
|
||||
| bollard | removable | |
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user