expose data about turning onto restricted roads to turn function

This commit is contained in:
karenzshea
2017-02-14 12:59:16 +01:00
committed by Patrick Niklaus
parent a0e7bab598
commit c2727f2029
19 changed files with 210 additions and 103 deletions
+8
View File
@@ -65,6 +65,8 @@ local profile = {
'delivery'
},
restricted_access_tag_list = Set { },
access_tags_hierarchy = Sequence {
'bicycle',
'vehicle',
@@ -521,4 +523,10 @@ function turn_function(turn)
if turn.has_traffic_light then
turn.duration = turn.duration + profile.traffic_light_penalty
end
if properties.weight_name == 'cyclability' then
-- penalize turns from non-local access only segments onto local access only tags
if not turn.source_restricted and turn.target_restricted then
turn.weight = turn.weight + 3000
end
end
end