car profile options

This commit is contained in:
Arndt Brenschede 2019-09-28 08:27:23 +02:00
parent 365d52db22
commit 4be0e456b2
3 changed files with 36 additions and 11 deletions

View file

@ -25,6 +25,11 @@ assign validForCars = true
assign pass1coefficient = 1.3
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style
assign avoid_toll = false # %avoid_toll% | Avoid paid roads | boolean
assign avoid_unpaved = false # %avoid_unpaved% | Avoid unpaved roads, if possible | boolean
assign avoid_motorways = false # %avoid_motorways% | Avoid motorways | boolean
# classifier constants
assign classifier_none = 1
@ -33,6 +38,10 @@ assign classifier_ferry = 2
---context:way # following code refers to way-tags
assign is_avoided_toll_road and avoid_toll toll=yes
assign is_avoided_motorway and avoid_motorways highway=motorway|motorway_link
#
# calculate logical car access
#
@ -94,12 +103,13 @@ assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link
assign maxspeed_surface =
switch or surface= surface=paved|asphalt|concrete 999
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 =
switch tracktype= 999
switch tracktype=grade1 40
switch tracktype=grade2 5
switch tracktype=grade2 ( switch avoid_unpaved 2 5 )
1
assign maxspeed_implicit =
@ -173,6 +183,8 @@ assign maxspeed_explicit =
if reversedirection=yes then maxspeed_backward else maxspeed_forward
assign maxspeed =
min if is_avoided_toll_road then 0 else 999
min if is_avoided_motorway then 0 else 999
min onewayspeedlimit
min accessspeedlimit
min maxspeed_explicit
@ -199,7 +211,7 @@ assign priorityclassifier =
else if ( highway=tertiary ) then 22
else if ( highway=tertiary_link ) then 21
else if ( highway=unclassified ) then 20
else if ( isresidentialorliving ) then 6
else if ( isresidentialorliving ) then 6
else if ( highway=service ) then 6
else if ( highway=track ) then if tracktype=grade1 then 4 else 2
else if ( highway=bridleway|road ) then 2
@ -242,7 +254,7 @@ assign caraccess
motorcar=yes|permissive|designated|destination
assign initialcost =
switch and avoid_toll barrier=toll_booth 1000000
switch caraccess
0
1000000

View file

@ -24,9 +24,10 @@ assign p_standby = 250 # Watt
assign validForCars = true
assign pass1coefficient = 1.3
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style
assign avoid_toll = 1 # %avoid_toll% | Avoid paid roads | boolean
assign avoid_unpaved = 1 # %avoid_unpaved% | Avoid unpaved roads, if possible | boolean
assign avoid_motorways = 1 # %avoid_motorways% | Avoid motorways | boolean
assign avoid_toll = false # %avoid_toll% | Avoid paid roads | boolean
assign avoid_unpaved = false # %avoid_unpaved% | Avoid unpaved roads, if possible | boolean
assign avoid_motorways = false # %avoid_motorways% | Avoid motorways | boolean
# classifier constants

View file

@ -25,6 +25,11 @@ assign validForCars = true
assign pass1coefficient = 1.3
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style
assign avoid_toll = false # %avoid_toll% | Avoid paid roads | boolean
assign avoid_unpaved = false # %avoid_unpaved% | Avoid unpaved roads, if possible | boolean
assign avoid_motorways = false # %avoid_motorways% | Avoid motorways | boolean
# classifier constants
assign classifier_none = 1
@ -33,6 +38,10 @@ assign classifier_ferry = 2
---context:way # following code refers to way-tags
assign is_avoided_toll_road and avoid_toll toll=yes
assign is_avoided_motorway and avoid_motorways highway=motorway|motorway_link
#
# calculate logical car access
#
@ -94,12 +103,13 @@ assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link
assign maxspeed_surface =
switch or surface= surface=paved|asphalt|concrete 999
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 =
switch tracktype= 999
switch tracktype=grade1 40
switch tracktype=grade2 5
switch tracktype=grade2 ( switch avoid_unpaved 2 5 )
1
assign maxspeed_implicit =
@ -173,6 +183,8 @@ assign maxspeed_explicit =
if reversedirection=yes then maxspeed_backward else maxspeed_forward
assign maxspeed =
min if is_avoided_toll_road then 0 else 999
min if is_avoided_motorway then 0 else 999
min onewayspeedlimit
min accessspeedlimit
min maxspeed_explicit
@ -211,7 +223,7 @@ assign isgoodoneway = if reversedirection=yes then oneway=-1
else if oneway= then junction=roundabout else oneway=yes|true|1
assign isroundabout = junction=roundabout
assign isgoodforcars = if greater priorityclassifier 6 then true
else if ( or isresidentialorliving highway=service ) then true
else if or isresidentialorliving highway=service then true
else if ( and highway=track tracktype=grade1 ) then true
else false
@ -242,7 +254,7 @@ assign caraccess
motorcar=yes|permissive|designated|destination
assign initialcost =
switch and avoid_toll barrier=toll_booth 1000000
switch caraccess
0
1000000