update profiles for new db tags

This commit is contained in:
afischerdev 2023-07-06 13:45:44 +02:00
parent 79aa07ae84
commit e66468b091
6 changed files with 510 additions and 1123 deletions

View file

@ -19,15 +19,19 @@
assign validForBikes = true
# Use the following switches to change behaviour
assign allow_steps = true # %allow_steps% | Set to false to disallow steps | boolean
assign allow_ferries = true # %allow_ferries% | set to false to disallow ferries | boolean
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 = 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
assign allow_steps = true # %allow_steps% | Set to false to disallow steps | boolean
assign allow_ferries = true # %allow_ferries% | set to false to disallow ferries | boolean
assign allow_motorways = false # %allow_motorways% | Set to true to allow motorways (useful in Asia / Oceania for example) | boolean
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 avoid_path = false # %avoid_path% | Set to true to avoid pathes | boolean
assign consider_traffic = false # %consider_traffic% | Activate to avoid traffic | boolean
assign consider_noise = false # %consider_noise% | Activate to prefer a low-noise route | boolean
assign consider_river = false # %consider_river% | Activate to prefer a route along rivers or sees | boolean
assign consider_forest = false # %consider_forest% | Activate to prefer a route in forest or parks | boolean
assign consider_town = false # %consider_town% | Activate to bypass cities / big towns as far as possible | boolean
# Change elevation parameters
assign consider_elevation = true # %consider_elevation% | Set to false to ignore elevation in routing | boolean
@ -50,7 +54,9 @@ assign bikerPower = 100 # %bikerPower% | Average power (in W) provided by the
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, 7=locus-old-style]
assign turnInstructionCatchingRange = 40 # %turnInstructionCatchingRange% | Within this distance (in m) several turning instructions are combined into one and the turning angles are better approximated to the general direction | number
assign turnInstructionRoundabouts = true # %turnInstructionRoundabouts% | Set to "false" to avoid generating special turning instructions for roundabouts | 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
---context:way # following code refers to way-tags
@ -188,7 +194,52 @@ assign trafficpenalty =
assign isresidentialorliving = or highway=residential|living_street living_street=yes
# add estimate tags
assign noise_penalty
switch consider_noise
switch estimated_noise_class= 0
switch estimated_noise_class=1 0.3
switch estimated_noise_class=2 0.5
switch estimated_noise_class=3 0.7
switch estimated_noise_class=4 1
switch estimated_noise_class=5 1.2
switch estimated_noise_class=6 1.5 0 0
assign no_river_penalty
switch consider_river
switch estimated_river_class= 3
switch estimated_river_class=1 2
switch estimated_river_class=2 1.5
switch estimated_river_class=3 1
switch estimated_river_class=4 0.5
switch estimated_river_class=5 0.2
switch estimated_river_class=6 0 99 0
assign no_forest_penalty
switch consider_forest
switch estimated_forest_class= 1
switch estimated_forest_class=1 0.5
switch estimated_forest_class=2 0.4
switch estimated_forest_class=3 0.25
switch estimated_forest_class=4 0.15
switch estimated_forest_class=5 0.1
switch estimated_forest_class=6 0 99 0
assign town_penalty
switch consider_town
switch estimated_town_class= 0
switch estimated_town_class=1 0.2
switch estimated_town_class=2 0.4
switch estimated_town_class=3 0.6
switch estimated_town_class=4 0.7
switch estimated_town_class=5 0.8
switch estimated_town_class=6 1 99 0
assign costfactor
add town_penalty
add no_forest_penalty
add no_river_penalty
add noise_penalty
switch and highway= not route=ferry 10000
switch or highway=proposed highway=abandoned 10000
@ -210,7 +261,8 @@ assign costfactor
switch highway=cycleway 1.3
switch isresidentialorliving switch isunpaved 10 1.2
switch highway=service switch isunpaved 10 1.2
switch or highway=track or highway=road or highway=path highway=footway
switch highway=path switch avoid_path 2.1 1.1
switch or highway=track or highway=road highway=footway
switch tracktype=grade1 switch isunpaved 3 1.2
switch tracktype=grade2 switch isunpaved 10 3
switch tracktype=grade3 10.0
@ -269,6 +321,7 @@ assign classifiermask add isbadoneway
# include `smoothness=` tags in the response's WayTags for track analysis
assign dummyUsage = smoothness=
---context:node # following code refers to node tags
assign defaultaccess

View file

@ -10,16 +10,22 @@
---context:global
assign consider_elevation true # %consider_elevation% | Set to false, otherwise less interesting flat roads are chosen | boolean
assign consider_elevation = false # %consider_elevation% | Activate to prefer a route with few elevation meters | boolean
assign consider_noise = false # %consider_noise% | Activate to prefer a low-noise route | boolean
assign consider_river = false # %consider_river% | Activate to prefer a route along rivers or sees | boolean
assign consider_forest = false # %consider_forest% | Activate to prefer a route in forest or green areas| boolean
assign consider_town = false # %consider_town% | Activate to bypass cities / big towns as far as possible | boolean
assign avoid_path = false # %avoid_path% | Activate to avoid pathes | boolean
assign consider_traffic = 1 # %consider_traffic% | how do you plan to drive the tour? | [1=as cyclist alone in the week, 0.5=as cyclist alone at weekend, 0.3 =with a group of cyclists, 0.1=with a group of cyclists at week-end]
assign shortest_way 0 # 0 as default, duplicate shortest standard profile, SAC access limit ignored for now
assign iswet 0 # %iswet% | tries to prevent muddy boots and wet buttocks | boolean
assign hiking_routes_preference 0.20 # %hiking_routes_preference% | Increases cost of non hiking routes by multiplier 1 + hiking_routes_preference (0.10 to 2.0) | number
assign iswet 0 # %iswet% | tries to prevent muddy boots and wet buttocks | boolean
assign hiking_routes_preference 0.20 # %hiking_routes_preference% | Increases cost of non hiking routes by multiplier 1 + hiking_routes_preference (0.10 to 2.0) | number
assign Offroad_factor 0.0 # default 0.0, see ****), see also https://github.com/poutnikl/Brouter-profiles/wiki/Trekking-MTB-Profiles---legend
assign Offroad_factor 0.0 # default 0.0, see ****), see also https://github.com/poutnikl/Brouter-profiles/wiki/Trekking-MTB-Profiles---legend
assign path_preference 0.0 # 0.0 as default, try 20.0 to penalize nonpath ways a/o paved ways
assign path_preference 0.0 # 0.0 as default, try 20.0 to penalize nonpath ways a/o paved ways
#SAC - mountain hiking - see http://wiki.openstreetmap.org/wiki/Key:sac_scale
@ -312,7 +318,84 @@ assign rawcostfactor2
else if is_ldhr then rawcostfactor # is hiking route
else multiply rawcostfactor nonhiking_route_penalty
assign costfactor if shortest_way then ( add 1 accesspenalty )
assign noise_penalty
switch consider_noise
switch estimated_noise_class= 0
switch estimated_noise_class=1 0.3
switch estimated_noise_class=2 0.5
switch estimated_noise_class=3 0.7
switch estimated_noise_class=4 1
switch estimated_noise_class=5 1.2
switch estimated_noise_class=6 1.5 0 0
assign no_river_penalty
switch consider_river
switch estimated_river_class= 3
switch estimated_river_class=1 2
switch estimated_river_class=2 1.5
switch estimated_river_class=3 1
switch estimated_river_class=4 0.5
switch estimated_river_class=5 0.2
switch estimated_river_class=6 0 99 0
assign no_forest_penalty
switch consider_forest
switch estimated_forest_class= 1
switch estimated_forest_class=1 0.5
switch estimated_forest_class=2 0.4
switch estimated_forest_class=3 0.25
switch estimated_forest_class=4 0.15
switch estimated_forest_class=5 0.1
switch estimated_forest_class=6 0 99 0
assign town_penalty
switch consider_town
switch estimated_town_class= 0
switch estimated_town_class=1 0.5
switch estimated_town_class=2 0.9
switch estimated_town_class=3 1.2
switch estimated_town_class=4 1.3
switch estimated_town_class=5 1.4
switch estimated_town_class=6 1.6 99 0
assign trafficpenalty =
# if any_cycleway then 0
# else
if highway=primary|primary_link then
(
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=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=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 costfactor
add town_penalty
add no_forest_penalty
add no_river_penalty
add noise_penalty
add trafficpenalty
if shortest_way then ( add 1 accesspenalty )
else max 1.0 add rawcostfactor2 Offroad_factor_for_road
assign downhillcostfactor

View file

@ -1,5 +1,5 @@
---lookupversion:10
---minorversion:13
---minorversion:14
---context:way
@ -683,6 +683,35 @@ construction;0000000037 driveway
construction;0000000021 mini_roundabout
construction;0000000020 turning_loop
estimated_forest_class;0000000001 1
estimated_forest_class;0000000001 2
estimated_forest_class;0000000001 3
estimated_forest_class;0000000001 4
estimated_forest_class;0000000001 5
estimated_forest_class;0000000001 6
estimated_noise_class;0000000001 1
estimated_noise_class;0000000001 2
estimated_noise_class;0000000001 3
estimated_noise_class;0000000001 4
estimated_noise_class;0000000001 5
estimated_noise_class;0000000001 6
estimated_river_class;0000000001 1
estimated_river_class;0000000001 2
estimated_river_class;0000000001 3
estimated_river_class;0000000001 4
estimated_river_class;0000000001 5
estimated_river_class;0000000001 6
estimated_town_class;0000000001 1
estimated_town_class;0000000001 2
estimated_town_class;0000000001 3
estimated_town_class;0000000001 4
estimated_town_class;0000000001 5
estimated_town_class;0000000001 6
---context:node
highway;0001314954 bus_stop

View file

@ -14,8 +14,6 @@ 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 = 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
assign consider_elevation = true # %consider_elevation% | Set to false to ignore elevation in routing | boolean
@ -38,7 +36,9 @@ assign bikerPower = 100 # %bikerPower% | Average power (in W) provided by the
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, 7=locus-old-style]
assign turnInstructionCatchingRange = 40 # %turnInstructionCatchingRange% | Within this distance (in m) several turning instructions are combined into one and the turning angles are better approximated to the general direction | number
assign turnInstructionRoundabouts = true # %turnInstructionRoundabouts% | Set to "false" to avoid generating special turning instructions for roundabouts | 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
---context:way # following code refers to way-tags