turninstructions: update profiles
This commit is contained in:
parent
9ff455c05a
commit
7cb5e9f377
6 changed files with 489 additions and 54 deletions
|
|
@ -14,7 +14,7 @@ assign allow_ferries = true # set to false to disallow ferries
|
|||
assign ignore_cycleroutes = false # set to true for better elevation results
|
||||
assign stick_to_cycleroutes = false # set to true to just follow cycleroutes
|
||||
assign avoid_unsafe = false # set to true to avoid standard highways
|
||||
assign turnInstructionMode = 0 # 0=none, 1=gpsies-style, 2=locus-style
|
||||
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style
|
||||
|
||||
assign validForBikes = true
|
||||
|
||||
|
|
@ -77,28 +77,6 @@ assign initialclassifier =
|
|||
else classifier_none
|
||||
|
||||
|
||||
assign priorityclassifier =
|
||||
|
||||
if ( highway=motorway ) then 101
|
||||
else if ( highway=motorway_link ) then 100
|
||||
else if ( highway=trunk ) then 91
|
||||
else if ( highway=trunk_link ) then 90
|
||||
else if ( highway=primary ) then 88
|
||||
else if ( highway=primary_link ) then 87
|
||||
else if ( highway=secondary ) then 86
|
||||
else if ( highway=secondary_link ) then 85
|
||||
else if ( highway=tertiary ) then 84
|
||||
else if ( highway=tertiary_link ) then 83
|
||||
else if ( highway=unclassified ) then 82
|
||||
else if ( highway=residential|living_street ) then 50
|
||||
else if ( highway=service ) then 40
|
||||
else if ( highway=cycleway ) then 30
|
||||
else if ( highway=bridleway ) then 20
|
||||
else if ( highway=track|road|path|footway ) then 20
|
||||
else if ( highway=steps ) then 10
|
||||
else if ( highway=pedestrian ) then 10
|
||||
else 0
|
||||
|
||||
#
|
||||
# calculate the initial cost
|
||||
# this is added to the total cost each time the costfactor
|
||||
|
|
@ -145,7 +123,7 @@ assign footaccess =
|
|||
assign accesspenalty =
|
||||
if bikeaccess then 0
|
||||
else if footaccess then 4
|
||||
else 100000
|
||||
else 10000
|
||||
|
||||
#
|
||||
# handle one-ways. On primary roads, wrong-oneways should
|
||||
|
|
@ -153,11 +131,13 @@ assign accesspenalty =
|
|||
# 4 to the costfactor (making it at least 5 - you are allowed
|
||||
# to push your bike)
|
||||
#
|
||||
assign oneway =
|
||||
if oneway= then junction=roundabout else oneway=yes|true|1
|
||||
assign badoneway =
|
||||
if reversedirection=yes then
|
||||
if oneway= then junction=roundabout else oneway=yes|true|1
|
||||
else oneway=-1
|
||||
|
||||
assign onewaypenalty =
|
||||
if ( if reversedirection=yes then oneway else oneway=-1 ) then
|
||||
if ( badoneway ) then
|
||||
(
|
||||
if ( cycleway=opposite|opposite_lane|opposite_track ) then 0
|
||||
else if ( oneway:bicycle=no ) then 0
|
||||
|
|
@ -168,7 +148,6 @@ assign onewaypenalty =
|
|||
)
|
||||
else 0.0
|
||||
|
||||
|
||||
#
|
||||
# calculate the cost-factor, which is the factor
|
||||
# by which the distance of a way-segment is multiplied
|
||||
|
|
@ -176,19 +155,38 @@ assign onewaypenalty =
|
|||
# must be >=1 and it's supposed to be close to 1 for
|
||||
# the type of way the routing profile is searching for
|
||||
#
|
||||
assign costfactor =
|
||||
assign costfactor
|
||||
|
||||
add ( max onewaypenalty accesspenalty )
|
||||
#
|
||||
# exclude rivers, rails etc.
|
||||
#
|
||||
if ( and highway= not route=ferry ) then 10000
|
||||
|
||||
if ( and highway= not route=ferry ) then 100000
|
||||
#
|
||||
# exclude motorways and proposed roads
|
||||
#
|
||||
else if ( highway=motorway|motorway_link ) then 10000
|
||||
else if ( highway=proposed|abandoned ) then 10000
|
||||
|
||||
#
|
||||
# all other exclusions below (access, steps, ferries,..)
|
||||
# should not be deleted by the decoder, to be available
|
||||
# in voice-hint-processing
|
||||
#
|
||||
else min 9999
|
||||
|
||||
#
|
||||
# apply oneway-and access-penalties
|
||||
#
|
||||
add max onewaypenalty accesspenalty
|
||||
|
||||
#
|
||||
# steps and ferries are special. Note this is handled
|
||||
# before the cycleroute-switch, to be able
|
||||
# to really exlude them be setting cost to infinity
|
||||
#
|
||||
else if ( highway=steps ) then ( if allow_steps then 40 else 100000 )
|
||||
else if ( route=ferry ) then ( if allow_ferries then 5.67 else 100000 )
|
||||
if ( highway=steps ) then ( if allow_steps then 40 else 10000 )
|
||||
else if ( route=ferry ) then ( if allow_ferries then 5.67 else 10000 )
|
||||
|
||||
#
|
||||
# handle long-distance cycle-routes.
|
||||
|
|
@ -226,16 +224,10 @@ assign costfactor =
|
|||
#
|
||||
else add ( if ( and avoid_unsafe not isbike ) then 2 else 0 )
|
||||
|
||||
#
|
||||
# exclude motorways and proposed roads
|
||||
#
|
||||
if ( highway=motorway|motorway_link ) then 100000
|
||||
else if ( highway=proposed|abandoned ) then 100000
|
||||
|
||||
#
|
||||
# actuals roads are o.k. if we have a bike hint
|
||||
#
|
||||
else if ( highway=trunk|trunk_link ) then ( if isbike then 1.5 else 10 )
|
||||
if ( highway=trunk|trunk_link ) then ( if isbike then 1.5 else 10 )
|
||||
else if ( highway=primary|primary_link ) then ( if isbike then 1.2 else 3 )
|
||||
else if ( highway=secondary|secondary_link ) then ( if isbike then 1.1 else 1.6 )
|
||||
else if ( highway=tertiary|tertiary_link ) then ( if isbike then 1.0 else 1.4 )
|
||||
|
|
@ -247,6 +239,51 @@ assign costfactor =
|
|||
else 2.0
|
||||
|
||||
|
||||
# way priorities used for voice hint generation
|
||||
|
||||
assign priorityclassifier =
|
||||
|
||||
if ( highway=motorway ) then 30
|
||||
else if ( highway=motorway_link ) then 29
|
||||
else if ( highway=trunk ) then 28
|
||||
else if ( highway=trunk_link ) then 27
|
||||
else if ( highway=primary ) then 26
|
||||
else if ( highway=primary_link ) then 25
|
||||
else if ( highway=secondary ) then 24
|
||||
else if ( highway=secondary_link ) then 23
|
||||
else if ( highway=tertiary ) then 22
|
||||
else if ( highway=tertiary_link ) then 21
|
||||
else if ( highway=unclassified ) then 20
|
||||
else if ( highway=residential|living_street ) then 6
|
||||
else if ( highway=service ) then 6
|
||||
else if ( highway=cycleway ) then 6
|
||||
else if ( bicycle=designated ) then 6
|
||||
else if ( highway=track ) then if tracktype=grade1 then 6 else 4
|
||||
else if ( highway=bridleway|road|path|footway ) then 4
|
||||
else if ( highway=steps ) then 2
|
||||
else if ( highway=pedestrian ) then 2
|
||||
else 0
|
||||
|
||||
# some more classifying bits used for voice hint generation...
|
||||
|
||||
assign isbadoneway = not equal onewaypenalty 0
|
||||
assign isgoodoneway = if reversedirection=yes then oneway=-1
|
||||
else if oneway= then junction=roundabout else oneway=yes|true|1
|
||||
assign isroundabout = junction=roundabout
|
||||
assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link
|
||||
assign isgoodforcars = if greater priorityclassifier 6 then true
|
||||
else if highway=residential|living_street|service then true
|
||||
else if ( and highway=track tracktype=grade1 ) then true
|
||||
else false
|
||||
|
||||
# ... encoded into a bitmask
|
||||
|
||||
assign classifiermask add isbadoneway
|
||||
add multiply isgoodoneway 2
|
||||
add multiply isroundabout 4
|
||||
add multiply islinktype 8
|
||||
multiply isgoodforcars 16
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
|
||||
assign defaultaccess =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue