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:
Daniel J. Hofmann
2015-08-25 14:46:05 +02:00
parent 3e8ef5e462
commit db30836b53
2 changed files with 12 additions and 1 deletions
+5 -1
View File
@@ -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