expose data about turning onto restricted roads to turn function
This commit is contained in:
committed by
Patrick Niklaus
parent
a0e7bab598
commit
c2727f2029
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user