Reworks Restriction Whitelist / Blacklist, resolves #2833

Takes a stricter aproach for whitelisting / blacklisting restrictions:

- uses `restriction=`
- uses more specific `restriction:<type>=`
- uses `except=<type>` to invert

Where `type` is the type of transportation to restrict, e.g. `motorcar`.

https://github.com/Project-OSRM/osrm-backend/issues/2833
This commit is contained in:
Daniel J. Hofmann
2016-09-09 12:34:04 +02:00
committed by Moritz Kobitzsch
parent e7b2f85a20
commit bbbbacb073
9 changed files with 38 additions and 51 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ access_tag_restricted = { ["destination"] = true, ["delivery"] = true }
access_tags_hierarchy = { "foot", "access" }
service_tag_restricted = { ["parking_aisle"] = true }
ignore_in_grid = { ["ferry"] = true }
restriction_exception_tags = { "foot" }
restrictions = { "foot" }
walking_speed = 5
@@ -71,8 +71,8 @@ properties.continue_straight_at_waypoint = false
local fallback_names = true
function get_exceptions(vector)
for i,v in ipairs(restriction_exception_tags) do
function get_restrictions(vector)
for i,v in ipairs(restrictions) do
vector:Add(v)
end
end