tweaked avoid logic
This commit is contained in:
parent
35e5525fbb
commit
c87519bfb2
1 changed files with 7 additions and 13 deletions
|
@ -37,13 +37,8 @@ assign classifier_ferry = 2
|
||||||
|
|
||||||
---context:way # following code refers to way-tags
|
---context:way # following code refers to way-tags
|
||||||
|
|
||||||
assign is_avoided_toll_road
|
assign is_avoided_toll_road and avoid_toll toll=yes
|
||||||
and avoid_toll toll=yes
|
assign is_avoided_motorway and avoid_motorways highway=motorway|motorway_link
|
||||||
|
|
||||||
assign ispaved surface=paved|asphalt|concrete|paving_stones
|
|
||||||
assign isunpaved not or surface= or ispaved or surface=fine_gravel surface=cobblestone
|
|
||||||
assign is_avoided_unpaved and avoid_unpaved isunpaved
|
|
||||||
assign is_avoided_motorway and avoid_motorways highway=motorway
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -107,12 +102,13 @@ assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link
|
||||||
assign maxspeed_surface =
|
assign maxspeed_surface =
|
||||||
switch or surface= surface=paved|asphalt|concrete 999
|
switch or surface= surface=paved|asphalt|concrete 999
|
||||||
switch surface=paving_stones|cobblestone|sett 30
|
switch surface=paving_stones|cobblestone|sett 30
|
||||||
2
|
switch surface=fine_gravel ( switch avoid_unpaved 3 10 )
|
||||||
|
switch avoid_unpaved 1 2
|
||||||
|
|
||||||
assign maxspeed_tracktype =
|
assign maxspeed_tracktype =
|
||||||
switch tracktype= 999
|
switch tracktype= 999
|
||||||
switch tracktype=grade1 40
|
switch tracktype=grade1 40
|
||||||
switch tracktype=grade2 5
|
switch tracktype=grade2 ( switch avoid_unpaved 2 5 )
|
||||||
1
|
1
|
||||||
|
|
||||||
assign maxspeed_implicit =
|
assign maxspeed_implicit =
|
||||||
|
@ -186,10 +182,8 @@ assign maxspeed_explicit =
|
||||||
if reversedirection=yes then maxspeed_backward else maxspeed_forward
|
if reversedirection=yes then maxspeed_backward else maxspeed_forward
|
||||||
|
|
||||||
assign maxspeed =
|
assign maxspeed =
|
||||||
if or is_avoided_toll_road
|
min if is_avoided_toll_road then 0 else 999
|
||||||
is_avoided_motorway then 0
|
min if is_avoided_motorway then 0 else 999
|
||||||
else if is_avoided_unpaved then 4
|
|
||||||
else
|
|
||||||
min onewayspeedlimit
|
min onewayspeedlimit
|
||||||
min accessspeedlimit
|
min accessspeedlimit
|
||||||
min maxspeed_explicit
|
min maxspeed_explicit
|
||||||
|
|
Loading…
Reference in a new issue