parent
e303f34415
commit
6183f567b7
9 changed files with 217 additions and 236 deletions
Binary file not shown.
Binary file not shown.
|
@ -13,4 +13,4 @@ profiles_url=https://brouter.de/brouter/profiles2/
|
|||
# these are comma separated arrays
|
||||
|
||||
check_lookup=lookups.dat
|
||||
check_profiles=car-eco.brf,car-fast.brf,dummy.brf,fastbike.brf,fastbike-asia-pacific.brf,fastbike-lowtraffic.brf,moped.brf,shortest.brf,trekking.brf,vm-forum-liegerad-schnell.brf,vm-forum-velomobil-schnell.brf
|
||||
check_profiles=car-eco.brf,car-eco-de.brf,car-eco-suspect_scan.brf,car-fast.brf,car-traffic_analysis.brf,fastbike.brf,fastbike-asia-pacific.brf,fastbike-lowtraffic.brf,fastbike-verylowtraffic.brf,hiking-beta.brf,moped.brf,rail.brf,river.brf,safety.brf,shortest.brf,trekking.brf,trekking-ignore-cr.brf,trekking-noferries.brf,trekking-nosteps.brf,trekking-steep.brf,vm-forum-liegerad-schnell.brf,vm-forum-velomobil-schnell.brf
|
|
@ -36,8 +36,8 @@ public class DownloadService extends Service implements ProgressListener {
|
|||
private static final boolean DEBUG = false;
|
||||
|
||||
String segmenturl = "https://brouter.de/brouter/segments4/";
|
||||
String lookupurl = "https://brouter.de/brouter/segments4/";
|
||||
String profilesurl = "https://brouter.de/brouter/segments4/";
|
||||
String lookupurl = "https://brouter.de/brouter/profile2/";
|
||||
String profilesurl = "https://brouter.de/brouter/profile2/";
|
||||
String checkLookup = "lookups.dat";
|
||||
String checkProfiles = "";
|
||||
|
||||
|
|
|
@ -9,45 +9,30 @@
|
|||
|
||||
---context:global
|
||||
|
||||
# Car profile
|
||||
# kinematic parameters
|
||||
|
||||
assign vmax = 90 # kmh
|
||||
assign recup_efficiency = 0.7 # (ratio)
|
||||
assign totalweight = 1640 # kg
|
||||
assign f_roll = 232 # Newton
|
||||
assign f_air = 0.4 # 0.5*cw*A*rho
|
||||
assign f_recup = 400 # Newton
|
||||
assign p_standby = 250 # Watt
|
||||
|
||||
# technical parameters
|
||||
|
||||
assign forceSecondaryData = true
|
||||
assign validForCars = true
|
||||
|
||||
# Use the following switches to change behaviour
|
||||
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
|
||||
|
||||
# Kinematic model parameters
|
||||
assign vmax = 90 # %vmax% | Target speed (in km/h) | number
|
||||
assign recup_efficiency = 0.7 # %recup_efficiency% | (ratio) | number
|
||||
assign totalweight = 1640 # %totalweight% | Total weight of the car (in kg) | number
|
||||
assign f_roll = 232 # %f_roll% | Rolling friction (in Newton) | number
|
||||
assign f_air = 0.4 # %f_air% | Drag force (in Newton / (m/s)^2), 0.5*cw*A*rho | number
|
||||
assign f_recup = 400 # %f_recup% | Newton | number
|
||||
assign p_standby = 250 # %p_standby% | Watt | number
|
||||
|
||||
# Turn instructions settings
|
||||
assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style]
|
||||
|
||||
# Technical parameters
|
||||
assign pass1coefficient = 1.3
|
||||
|
||||
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style
|
||||
|
||||
---context:way # following code refers to way-tags
|
||||
|
||||
# classifier constants
|
||||
assign classifier_none = 1
|
||||
assign classifier_ferry = 2
|
||||
|
||||
assign is_avoided_toll_road and avoid_toll toll=yes
|
||||
assign is_avoided_motorway and avoid_motorways highway=motorway|motorway_link
|
||||
|
||||
assign initialcost switch route=ferry 20000 0
|
||||
|
||||
#
|
||||
# calculate logical car access
|
||||
#
|
||||
assign isresidentialorliving = or highway=residential|living_street living_street=yes
|
||||
|
||||
assign caraccess
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
|
@ -60,7 +45,7 @@ assign caraccess
|
|||
switch highway=tertiary|tertiary_link 1
|
||||
switch highway=unclassified 1
|
||||
switch route=ferry 1
|
||||
switch isresidentialorliving 1
|
||||
switch highway=residential|living_street 1
|
||||
switch highway=service 1
|
||||
0
|
||||
access=yes|permissive|designated|destination
|
||||
|
@ -68,32 +53,6 @@ assign caraccess
|
|||
motor_vehicle=yes|permissive|designated|destination
|
||||
motorcar=yes|permissive|designated|destination
|
||||
|
||||
assign caraccess_destination
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
switch vehicle=
|
||||
access=destination
|
||||
vehicle=destination
|
||||
motor_vehicle=destination
|
||||
motorcar=destination
|
||||
|
||||
#
|
||||
# for any change in initialclassifier, initialcost is added once
|
||||
#
|
||||
assign initialclassifier =
|
||||
if route=ferry then classifier_ferry
|
||||
else classifier_none
|
||||
|
||||
|
||||
#
|
||||
# calculate the initial cost
|
||||
# this is added to the total cost each time the costfactor
|
||||
# changed
|
||||
#
|
||||
assign initialcost =
|
||||
if ( equal initialclassifier classifier_ferry ) then 10000
|
||||
else 0
|
||||
|
||||
assign accessspeedlimit = if caraccess then 999 else 0
|
||||
|
||||
assign isbadoneway = if reversedirection=yes then ( if oneway= then junction=roundabout else oneway=yes|true|1 ) else oneway=-1
|
||||
|
@ -103,14 +62,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
|
||||
switch surface=fine_gravel ( switch avoid_unpaved 3 10 )
|
||||
switch avoid_unpaved 1 2
|
||||
switch surface=paving_stones|cobblestone 30
|
||||
2
|
||||
|
||||
assign maxspeed_tracktype =
|
||||
switch tracktype= 999
|
||||
switch tracktype=grade1 40
|
||||
switch tracktype=grade2 ( switch avoid_unpaved 2 5 )
|
||||
switch tracktype=grade2 5
|
||||
1
|
||||
|
||||
assign maxspeed_implicit =
|
||||
|
@ -124,48 +82,14 @@ assign maxspeed_implicit =
|
|||
switch highway=unclassified 50
|
||||
switch route=ferry 10
|
||||
switch highway=bridleway 10
|
||||
switch isresidentialorliving 30
|
||||
switch highway=residential|living_street 30
|
||||
switch highway=service 30
|
||||
switch highway=track|road|path switch tracktype=grade1 30 5
|
||||
0
|
||||
|
||||
assign maxspeed_forward =
|
||||
switch maxspeed:forward=50 50
|
||||
switch maxspeed:forward=30 30
|
||||
switch maxspeed:forward=10 10
|
||||
switch maxspeed:forward=20 20
|
||||
switch maxspeed:forward=40 40
|
||||
switch maxspeed:forward=60 60
|
||||
switch maxspeed:forward=70 70
|
||||
switch maxspeed:forward=80 80
|
||||
switch maxspeed:forward=90 90
|
||||
switch maxspeed:forward=100 100
|
||||
switch maxspeed:forward=110 110
|
||||
switch maxspeed:forward=120 120
|
||||
switch maxspeed:forward=130 130
|
||||
switch maxspeed:forward=urban 50
|
||||
switch maxspeed:forward=rural 100
|
||||
999
|
||||
|
||||
assign maxspeed_backward =
|
||||
switch maxspeed:backward=50 50
|
||||
switch maxspeed:backward=30 30
|
||||
switch maxspeed:backward=10 10
|
||||
switch maxspeed:backward=20 20
|
||||
switch maxspeed:backward=40 40
|
||||
switch maxspeed:backward=60 60
|
||||
switch maxspeed:backward=70 70
|
||||
switch maxspeed:backward=80 80
|
||||
switch maxspeed:backward=90 90
|
||||
switch maxspeed:backward=100 100
|
||||
switch maxspeed:backward=110 110
|
||||
switch maxspeed:backward=120 120
|
||||
switch maxspeed:backward=130 130
|
||||
switch maxspeed:backward=urban 50
|
||||
switch maxspeed:backward=rural 100
|
||||
999
|
||||
|
||||
assign maxspeed_explicit =
|
||||
assign maxspeed =
|
||||
min onewayspeedlimit
|
||||
min accessspeedlimit
|
||||
switch maxspeed=50 50
|
||||
switch maxspeed=30 30
|
||||
switch maxspeed=10 10
|
||||
|
@ -181,21 +105,13 @@ assign maxspeed_explicit =
|
|||
switch maxspeed=130 130
|
||||
switch maxspeed=urban 50
|
||||
switch maxspeed=rural 100
|
||||
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
|
||||
min maxspeed_implicit
|
||||
min maxspeed_surface maxspeed_tracktype
|
||||
|
||||
assign costfactor = if equal maxspeed 0 then 10000 else 0
|
||||
|
||||
assign minspeed =
|
||||
switch highway=motorway|motorway_link|trunk 75 0
|
||||
switch highway=motorway|trunk 75 0
|
||||
|
||||
# way priorities used for voice hint generation
|
||||
|
||||
|
@ -212,7 +128,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 ( highway=residential|living_street ) 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
|
||||
|
@ -224,7 +140,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 highway=residential|living_street|service then true
|
||||
else if ( and highway=track tracktype=grade1 ) then true
|
||||
else false
|
||||
|
||||
|
@ -235,8 +151,8 @@ assign classifiermask add isbadoneway
|
|||
add multiply isroundabout 4
|
||||
add multiply islinktype 8
|
||||
add multiply isgoodforcars 16
|
||||
add multiply isresidentialorliving 32
|
||||
multiply caraccess_destination 64
|
||||
multiply highway=residential|living_street 32
|
||||
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
|
||||
|
@ -255,18 +171,12 @@ assign caraccess
|
|||
motorcar=yes|permissive|designated|destination
|
||||
|
||||
assign initialcost =
|
||||
switch and avoid_toll barrier=toll_booth 1000000
|
||||
|
||||
switch caraccess
|
||||
0
|
||||
1000000
|
||||
|
||||
assign maxspeed =
|
||||
|
||||
if or crossing=traffic_signals highway=traffic_signals
|
||||
then
|
||||
switch greater way:priorityclassifier 24 5
|
||||
switch greater way:priorityclassifier 22 3
|
||||
switch greater way:priorityclassifier 20 1
|
||||
0
|
||||
else if railway=level_crossing then 0
|
||||
if or crossing=traffic_signals highway=traffic_signals then 0
|
||||
else 999
|
|
@ -1,4 +1,4 @@
|
|||
# "fastbike-verylowtraffic.brf" -- Version 20-09-2019
|
||||
# "fastbike-verylowtraffic.brf" -- Version 23.08.2021
|
||||
# This profile, developed by Ess Bee, is based on the "fastbike-lowtraffic" profile
|
||||
# it is intended for road cyclists who ride alone and / or in the middle of the week: thus trucks and high traffic are avoided
|
||||
# (cyclists in group at the weekend will rather use "fastbike.brf" or "fastbike-lowprofile.brf" as groups are better respected by cars and trucks)
|
||||
|
@ -14,27 +14,41 @@
|
|||
#
|
||||
|
||||
---context:global # following code refers to global config
|
||||
assign processUnusedTags false # set to true if you want to display all tags in the "data"
|
||||
|
||||
# to generate turn instructions, adapt the mode by need
|
||||
assign turnInstructionMode 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style
|
||||
assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for the generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style]
|
||||
|
||||
# Use the following switches to change behaviour
|
||||
# (1=yes, 0=no):
|
||||
|
||||
assign consider_elevation 0 # set to 1 to calculate an elevation_penalty in routing
|
||||
assign avoid_path 0 # set to 1 to avoid path (a.e. to avoid conflicts with pedestrians!)
|
||||
assign turnInstructionCatchingRange 8 # 2 turn instructions are generated only when distance > 8 m
|
||||
assign turnInstructionRoundabouts = 1 # roundabout, "take exit N"
|
||||
assign considerTurnRestrictions true # turn restrictions are considered
|
||||
assign consider_elevation = false # %consider_elevation% | set to true to consider costs for elevation | boolean
|
||||
assign avoid_path = false # %avoid_path% | set to true to avoid pathes | boolean
|
||||
assign consider_traffic = 1 # %consider_traffic% | 0 => no cost for "traffic_class" or "maxspeed", 1 => costs are considered!: value example 0.3 | number
|
||||
|
||||
assign cycleway_lane_penalty = 0 # 0 => when lane, no cost for traffic or max speed, 1 => same cost as on the highway itself: example 0.3
|
||||
|
||||
assign turnInstructionCatchingRange = 8 # 2 turn instructions are generated only when distance > 8 m
|
||||
assign turnInstructionRoundabouts = false # roundabout, no "take exit N" (as "N" may be confusing compared to car)
|
||||
assign considerTurnRestrictions = true # turn restrictions are considered
|
||||
|
||||
assign validForBikes 1
|
||||
|
||||
# the elevation parameters
|
||||
|
||||
assign downhillcost switch consider_elevation 60 0
|
||||
assign downhillcutoff 1.5
|
||||
assign uphillcost switch consider_elevation 100 0
|
||||
assign uphillcutoff 1.5
|
||||
# assign downhillcost switch consider_elevation 60 0
|
||||
# assign downhillcutoff 1.5
|
||||
# assign uphillcost switch consider_elevation 100 0
|
||||
# assign uphillcutoff 1.5
|
||||
|
||||
assign downhillcost 60
|
||||
assign downhillcutoff switch consider_elevation 1.5 15
|
||||
assign uphillcost 100
|
||||
assign uphillcutoff switch consider_elevation 1.5 15
|
||||
|
||||
|
||||
# extention...(not supported yet)
|
||||
assign jonctionToLeftCost_HL = 151 # turn left from High to Low prio
|
||||
assign jonctionToLeftCost_LH = 77 # turn left from Low to High prio
|
||||
|
||||
---context:way # following code refers to way-tags
|
||||
|
||||
|
@ -133,114 +147,125 @@ assign onewaypenalty =
|
|||
)
|
||||
else 0.0
|
||||
|
||||
assign surfacepenalty
|
||||
switch highway=unclassified|service|track|road|path|footway|cycleway
|
||||
switch surface=asphalt 0
|
||||
switch surface=paved switch smoothness=good|excellent 0 0.1 # befestigte(harte)Oberfläche
|
||||
switch concrete=plates 1 # Betonplattenwege
|
||||
switch surface=concrete|paving_stones|wood|metal 0.7 # Beton, Pflastersteine, Holz, Metall
|
||||
switch surface=cobblestone 2 # Kopfsteinpflaster
|
||||
switch concrete=lanes 3 # Betonspurplatten
|
||||
switch surface=fine_gravel|compacted 4 # Splitt,verdichtete Oberfläche
|
||||
switch surface=sett|grass_paver 5 # behauene Pflastersteine, Rasengittersteine
|
||||
switch surface=gravel|sand|pebblestone|unpaved 10 # Schotter, Sand, Kies, unbefestigt
|
||||
switch surface=ground|grass|dirt|earth|mud|clay 25 # naturbelassene Oberfläche, Gras, Schutz Schlamm...
|
||||
# if "surface" is not defined, for service and road asphalt is probable
|
||||
assign surfacepenalty =
|
||||
# if "surface" is not defined...
|
||||
switch surface=
|
||||
switch highway=service|road 0.1
|
||||
# then, for Primary, secondary and tertiary asphalt is very probable
|
||||
switch highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link 0
|
||||
# then, for residential & Co. probably asphalt..
|
||||
switch highway=road|residential|unclassified 0.1
|
||||
# then, for living_street something paved ..
|
||||
switch highway=living_street 0.3
|
||||
# then, for "service & cycleway" possibly good (but not sure!) ...
|
||||
switch highway=service|cycleway 0.5
|
||||
# in some cases only smoothness is tagged but surface not!
|
||||
switch smoothness=intermediate|good|excellent 0
|
||||
# else, check if tracktype=grade1, then is probably paved, so middle penalty
|
||||
switch tracktype=grade1 1.3
|
||||
# else, check if tracktype=grade1, then it is "something" paved, so middle penalty
|
||||
switch tracktype=grade1 0.2
|
||||
# if a cycleroute is defined, surface can not be horrible...
|
||||
switch any_cycleroute 3.5 5
|
||||
# surface not known yet?
|
||||
5
|
||||
# no "surface" penalty for other highways
|
||||
0
|
||||
switch surface=asphalt 0
|
||||
switch surface=paved switch smoothness=good|excellent 0.1 0.3 # befestigte(harte)Oberfl sche
|
||||
switch surface=gravel|sand|pebblestone|unpaved 10 # Schotter, Sand, Kies, unbefestigt
|
||||
switch surface=ground|grass|dirt|earth|mud|clay 25 # naturbelassene Oberfl sche, Gras, Schutz Schlamm...
|
||||
switch surface=fine_gravel|compacted switch smoothness=good|excellent 1 4 # Splitt,verdichtete Oberflaesche
|
||||
switch surface=sett switch smoothness=good|excellent 0.1 0.3 # behauene Pflastersteine
|
||||
switch concrete=plates 1 # Betonplattenwege
|
||||
switch surface=concrete|paving_stones|wood|metal 0.8 # Beton, Pflastersteine (geschnitzt), Holz, Metall
|
||||
switch surface=cobblestone|sett switch smoothness=good|excellent 1 2 # Kopfsteinpflaster
|
||||
# switch surface=unhewn_cobblestone 3 # ungeschnitzter Pflasterstein
|
||||
switch concrete=lanes 3 # Betonspurplatten
|
||||
switch surface=grass_paver 5 # Rasengittersteine
|
||||
|
||||
# surface not known and probably not paved / no asphalt...
|
||||
8
|
||||
|
||||
assign tracktypepenalty
|
||||
switch tracktype= 0
|
||||
switch tracktype=grade2 1
|
||||
switch tracktype=grade3 5
|
||||
switch tracktype=grade3 8
|
||||
switch tracktype=grade4 15
|
||||
switch tracktype=grade5 50 0
|
||||
|
||||
|
||||
assign trafficpenalty =
|
||||
if any_cycleway then 0
|
||||
else
|
||||
# if any_cycleway then 0
|
||||
# else
|
||||
if highway=primary|primary_link then
|
||||
(
|
||||
if estimated_traffic_class=4 then 0.8
|
||||
else if estimated_traffic_class=5 then 1
|
||||
else if estimated_traffic_class=6|7 then 2
|
||||
else 0.6
|
||||
if estimated_traffic_class=1|2 then 0
|
||||
else if estimated_traffic_class=3 then multiply 0.4 consider_traffic
|
||||
else if estimated_traffic_class=4 then multiply 0.8 consider_traffic
|
||||
else if estimated_traffic_class=5 then multiply 1 consider_traffic
|
||||
else if estimated_traffic_class=6|7 then multiply 2 consider_traffic
|
||||
else multiply 0.6 consider_traffic
|
||||
)
|
||||
else if highway=secondary|secondary_link then
|
||||
(
|
||||
if estimated_traffic_class=3 then 0.3
|
||||
else if estimated_traffic_class=4 then 0.7
|
||||
else if estimated_traffic_class=5 then 1
|
||||
else if estimated_traffic_class=6|7 then 1.5
|
||||
else 0.2
|
||||
if estimated_traffic_class=1|2 then multiply 0.1 consider_traffic
|
||||
else if estimated_traffic_class=3 then multiply 0.3 consider_traffic
|
||||
else if estimated_traffic_class=4 then multiply 0.7 consider_traffic
|
||||
else if estimated_traffic_class=5 then multiply 1 consider_traffic
|
||||
else if estimated_traffic_class=6|7 then multiply 1.5 consider_traffic
|
||||
else multiply 0.2 consider_traffic
|
||||
)
|
||||
else if highway=tertiary|tertiary_link then
|
||||
(
|
||||
if estimated_traffic_class=2 then 0.1
|
||||
else if estimated_traffic_class=3 then 0.2
|
||||
else if estimated_traffic_class=4 then 0.3
|
||||
else if estimated_traffic_class=5|6|7 then 0.5
|
||||
else 0.1
|
||||
if estimated_traffic_class=1|2 then multiply 0.1 consider_traffic
|
||||
else if estimated_traffic_class=3 then multiply 0.2 consider_traffic
|
||||
else if estimated_traffic_class=4 then multiply 0.5 consider_traffic
|
||||
else multiply if estimated_traffic_class=5|6|7 then multiply 1 consider_traffic
|
||||
else 0.1 consider_traffic
|
||||
)
|
||||
else 0
|
||||
|
||||
assign smoothnesspenalty =
|
||||
switch smoothness=intermediate 0.2
|
||||
switch smoothness=bad 0.8
|
||||
switch smoothness=very_bad 1.5
|
||||
switch smoothness=horrible 2.5 0
|
||||
|
||||
switch smoothness=intermediate 0.3
|
||||
switch smoothness=bad 1
|
||||
switch smoothness=very_bad 2
|
||||
switch smoothness=horrible 4.5
|
||||
0
|
||||
|
||||
assign maxspeedpenalty =
|
||||
switch or highway=primary highway=primary_link
|
||||
# as soon "name" is supported in lookup, replace with "switch maxspeed= switch name= 2.2 1
|
||||
switch maxspeed=50 0.2
|
||||
switch any_cycleway 0.2
|
||||
switch maxspeed=60 0.7
|
||||
switch maxspeed=70 1.2
|
||||
switch maxspeed=80 1.5
|
||||
switch maxspeed=90 2.0
|
||||
switch maxspeed=100 3.0
|
||||
switch maxspeed=110 11
|
||||
switch maxspeed=120 12
|
||||
switch maxspeed=130 13
|
||||
switch maxspeed= 2.2 0
|
||||
switch maxspeed=50 multiply 0.2 consider_traffic
|
||||
# switch any_cycleway multiply 0.2 consider_traffic
|
||||
switch maxspeed=60 multiply 0.7 consider_traffic
|
||||
switch maxspeed=70 multiply 1.2 consider_traffic
|
||||
switch maxspeed=80 multiply 1.5 consider_traffic
|
||||
switch maxspeed=90 multiply 2.0 consider_traffic
|
||||
switch maxspeed=100 multiply 3.0 consider_traffic
|
||||
switch maxspeed=110 multiply 11 consider_traffic
|
||||
switch maxspeed=120 multiply 12 consider_traffic
|
||||
switch maxspeed=130 multiply 13 consider_traffic
|
||||
switch maxspeed= multiply 2.2 consider_traffic 0
|
||||
switch or highway=secondary highway=secondary_link
|
||||
# as soon "name" is supported in lookup, replace with "switch maxspeed= switch name= 0.9 0.2
|
||||
switch maxspeed=50 0.1
|
||||
switch any_cycleway 0.1
|
||||
switch maxspeed=60 0.2
|
||||
switch maxspeed=70 0.9
|
||||
switch maxspeed=80 1.5
|
||||
switch maxspeed=90 2
|
||||
switch maxspeed=100 2.5
|
||||
switch maxspeed=110 11
|
||||
switch maxspeed=120 12
|
||||
switch maxspeed=130 13
|
||||
switch maxspeed= 0.9 0
|
||||
switch maxspeed=50 multiply 0.1 consider_traffic
|
||||
# switch any_cycleway multiply 0.1 consider_traffic
|
||||
switch maxspeed=60 multiply 0.2 consider_traffic
|
||||
switch maxspeed=70 multiply 0.9 consider_traffic
|
||||
switch maxspeed=80 multiply 1.5 consider_traffic
|
||||
switch maxspeed=90 multiply 2 consider_traffic
|
||||
switch maxspeed=100 multiply 2.5 consider_traffic
|
||||
switch maxspeed=110 multiply 11 consider_traffic
|
||||
switch maxspeed=120 multiply 12 consider_traffic
|
||||
switch maxspeed=130 multiply 13 consider_traffic
|
||||
switch maxspeed= multiply 0.9 consider_traffic 0
|
||||
switch or highway=tertiary highway=tertiary_link
|
||||
# as soon "name" is supported in lookup, replace with "switch maxspeed= switch name= 0.2 0.1
|
||||
switch maxspeed=50 0
|
||||
switch maxspeed=60 0.1
|
||||
switch any_cycleway 0.05
|
||||
switch maxspeed=70 0.2
|
||||
switch maxspeed=80 0.2
|
||||
switch maxspeed=90 0.3
|
||||
switch maxspeed=100 0.4
|
||||
switch maxspeed=110 11
|
||||
switch maxspeed=120 12
|
||||
switch maxspeed=130 13
|
||||
switch maxspeed= 0.2 0
|
||||
switch maxspeed=60 multiply 0.1 consider_traffic
|
||||
# switch any_cycleway 0.05 consider_traffic
|
||||
switch maxspeed=70 multiply 0.2 consider_traffic
|
||||
switch maxspeed=80 multiply 0.2 consider_traffic
|
||||
switch maxspeed=90 multiply 0.3 consider_traffic
|
||||
switch maxspeed=100 multiply 0.4 consider_traffic
|
||||
switch maxspeed=110 multiply 11 consider_traffic
|
||||
switch maxspeed=120 multiply 12 consider_traffic
|
||||
switch maxspeed=130 multiply 13 consider_traffic
|
||||
switch maxspeed= multiply 0.2 consider_traffic 0
|
||||
0
|
||||
|
||||
# if bicycle=use_sidepath, then try to prefer the (hopefully!) existing sidepath with a penalty on this highway (only if avoid_path is not set)
|
||||
|
@ -248,22 +273,60 @@ assign usesidepathpenalty =
|
|||
switch bicycle=use_sidepath switch avoid_path 0 0.5 0
|
||||
|
||||
# give a light advantage to highways with a relation cycleroute
|
||||
assign nocycleway_penalty switch any_cycleroute 0 0.1
|
||||
assign nocycleroute_penalty switch any_cycleroute 0 0.05
|
||||
|
||||
assign not_bicycle_designatedpenalty switch bicycle=designated 0 0.1
|
||||
|
||||
assign path_penalty if avoid_path then 1 else 0
|
||||
|
||||
assign costfactor
|
||||
assign sum_highwaypenalty
|
||||
add surfacepenalty
|
||||
add tracktypepenalty
|
||||
add trafficpenalty
|
||||
add smoothnesspenalty
|
||||
add maxspeedpenalty
|
||||
add usesidepathpenalty
|
||||
add nocycleway_penalty
|
||||
add not_bicycle_designatedpenalty
|
||||
add path_penalty
|
||||
add nocycleroute_penalty
|
||||
not_bicycle_designatedpenalty
|
||||
|
||||
# penalties differ when a cycleway is associated to the highway with "cycleway=yes"
|
||||
|
||||
assign cycleway_surfacepenalty
|
||||
switch any_cycleway
|
||||
switch cycleway:surface= surfacepenalty # if not specified, same as highway
|
||||
switch cycleway:surface=asphalt 0
|
||||
switch cycleway:surface=sett 0.3 # behauene Pflastersteine
|
||||
switch cycleway:surface=paved 0.3 # befestigte(harte)Oberflaesche
|
||||
switch cycleway:surface=concrete|paving_stones 0.8 # Beton, Pflastersteine (geschnitzt)
|
||||
switch cycleway:surface=cobblestone|sett 2 # Kopfsteinpflaster
|
||||
switch cycleway:surface=fine_gravel|compacted 4 # Splitt,verdichtete Oberflaesche
|
||||
switch cycleway:surface=gravel 10 # Schotter
|
||||
0 # unknown value...
|
||||
1000 # noc cycleway
|
||||
|
||||
# to be activated after implementation of #241
|
||||
#assign cycleway_smoothnesspenalty
|
||||
# switch cycleway:smoothness= smoothnesspenalty # if not specified, same as highway
|
||||
# switch cycleway:smoothness=intermediate 0.3
|
||||
# switch cycleway:smoothness=bad 1
|
||||
# switch cycleway:smoothness=very_bad 2
|
||||
# switch cycleway:smoothness=horrible 4.5
|
||||
# 0
|
||||
|
||||
# temporary...
|
||||
assign cycleway_smoothnesspenalty smoothnesspenalty # temporray same as highway
|
||||
|
||||
assign sum_cyclewaypenalty
|
||||
switch any_cycleway # cycleway exists
|
||||
add multiply maxspeedpenalty cycleway_lane_penalty
|
||||
add multiply trafficpenalty cycleway_lane_penalty
|
||||
add cycleway_surfacepenalty
|
||||
add cycleway_smoothnesspenalty
|
||||
usesidepathpenalty
|
||||
# add nocycleroute_penalty
|
||||
# add not_bicycle_designatedpenalty
|
||||
10000 # no cycleway
|
||||
|
||||
assign costfactor
|
||||
add min sum_highwaypenalty sum_cyclewaypenalty
|
||||
switch or highway=proposed highway=abandoned 10000
|
||||
min 9999
|
||||
add max onewaypenalty accesspenalty
|
||||
|
@ -277,12 +340,13 @@ assign costfactor
|
|||
switch highway=steps 100
|
||||
switch route=ferry 11
|
||||
switch highway=bridleway 31
|
||||
switch highway=cycleway 1
|
||||
switch highway=cycleway 0.9
|
||||
switch highway=living_street 1.2
|
||||
switch highway=residential 1.4
|
||||
switch highway=service 1.1
|
||||
switch highway=track|road|path 1
|
||||
switch highway=footway 1.7
|
||||
switch highway=residential switch bicycle_road=yes 1 1.4
|
||||
switch highway=service switch ( or service= service=alley ) 1.1 11
|
||||
switch highway=track|road 0.9
|
||||
switch highway=path switch avoid_path 2 1
|
||||
switch highway=footway switch bicycle=yes 1.7 4.7
|
||||
19.9
|
||||
|
||||
# way priorities used for voice hint generation
|
||||
|
@ -294,18 +358,18 @@ assign priorityclassifier =
|
|||
else if ( highway=trunk ) then 28
|
||||
else if ( highway=trunk_link ) then 27
|
||||
else if ( highway=primary ) then 23
|
||||
else if ( highway=primary_link ) then 23
|
||||
else if ( highway=primary_link ) then 9
|
||||
else if ( highway=secondary ) then 22
|
||||
else if ( highway=secondary_link ) then 22
|
||||
else if ( highway=secondary_link ) then 9
|
||||
else if ( highway=tertiary ) then 21
|
||||
else if ( highway=tertiary_link ) then 21
|
||||
else if ( highway=unclassified ) then 6
|
||||
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=tertiary_link ) then 9
|
||||
else if ( highway=residential|living_street ) then 8
|
||||
else if ( highway=unclassified ) then 8
|
||||
else if ( highway=service ) then 8
|
||||
else if ( highway=cycleway ) then 8
|
||||
else if ( bicycle=designated ) then 8
|
||||
else if ( highway=track|road|path )
|
||||
then if or surface=asphalt|paved|concrete|wood|metal tracktype=grade1 then 6 else 4
|
||||
then if or surface=asphalt|paved|paving_stones|concrete|wood|metal tracktype=grade1 then 8 else 6
|
||||
else if ( highway=steps ) then 2
|
||||
else if ( highway=pedestrian ) then 2
|
||||
else 0
|
||||
|
@ -331,8 +395,6 @@ assign classifiermask
|
|||
add multiply islinktype 8
|
||||
multiply isgoodforcars 16
|
||||
|
||||
# include `smoothness=` tags in the response's WayTags for track analysis
|
||||
assign dummyUsage = smoothness=
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
|
||||
|
@ -363,12 +425,20 @@ assign footaccess
|
|||
0
|
||||
1
|
||||
|
||||
assign railwaypenalty switch railway= 0 255
|
||||
assign railwaypenalty switch railway= 0 155
|
||||
# assign signalpenalty switch highway=traffic_signals 99
|
||||
# switch crossing=traffic_signals 49 0
|
||||
# note: in case of a "left-turn" at the traffic-signal the penalty is counted twice...
|
||||
|
||||
assign barrierpenalty switch barrier= 0
|
||||
switch barrier=block|bollard 59 139
|
||||
|
||||
assign initialcost
|
||||
add railwaypenalty
|
||||
# add signalpenalty
|
||||
add barrierpenalty
|
||||
switch bikeaccess
|
||||
0
|
||||
switch footaccess
|
||||
300
|
||||
1000000
|
||||
1000000
|
|
@ -24,7 +24,7 @@ assign allow_ferries = true # %allow_ferries% | set to false to dis
|
|||
assign ignore_cycleroutes = false # %ignore_cycleroutes% | Set to true for better elevation results | boolean
|
||||
assign stick_to_cycleroutes = false # %stick_to_cycleroutes% | Set to true to just follow cycleroutes | boolean
|
||||
assign avoid_unsafe = false # %avoid_unsafe% | Set to true to avoid standard highways | boolean
|
||||
assign considerTurnRestrictions = false # %considerTurnRestrictions% | Set to true to take turn restrictions into account | boolean
|
||||
assign considerTurnRestrictions = true # %considerTurnRestrictions% | Set to true to take turn restrictions into account | boolean
|
||||
assign processUnusedTags = false # %processUnusedTags% | Set to true to output unused tags in data tab | boolean
|
||||
assign consider_traffic = false # %consider_traffic% | Set to true to avoid traffic | boolean
|
||||
assign allow_motorways = false # %allow_motorways% | Set to true to allow motorways (useful in Asia / Oceania for example) | boolean
|
||||
|
|
|
@ -14,6 +14,7 @@ assign initialcost 0
|
|||
|
||||
assign costfactor
|
||||
switch railway=rail 1
|
||||
switch railway=narrow_gauge 1
|
||||
100000
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
|
|
|
@ -14,7 +14,7 @@ assign allow_ferries = true # %allow_ferries% | set to false to dis
|
|||
assign ignore_cycleroutes = false # %ignore_cycleroutes% | Set to true for better elevation results | boolean
|
||||
assign stick_to_cycleroutes = false # %stick_to_cycleroutes% | Set to true to just follow cycleroutes | boolean
|
||||
assign avoid_unsafe = false # %avoid_unsafe% | Set to true to avoid standard highways | boolean
|
||||
assign considerTurnRestrictions = false # %considerTurnRestrictions% | Set to true to take turn restrictions into account | boolean
|
||||
assign considerTurnRestrictions = true # %considerTurnRestrictions% | Set to true to take turn restrictions into account | boolean
|
||||
assign processUnusedTags = false # %processUnusedTags% | Set to true to output unused tags in data tab | boolean
|
||||
|
||||
# Change elevation parameters
|
||||
|
|
Loading…
Reference in a new issue