From 5fe5cca3a179761f95131d542725978458887d2f Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sun, 4 Aug 2019 13:08:27 +0200 Subject: [PATCH] Add support for bicycle_road=yes --- misc/profiles2/fastbike-asia-pacific.brf | 52 ++++++++++--------- misc/profiles2/fastbike-lowtraffic.brf | 43 +++++++-------- misc/profiles2/fastbike.brf | 52 ++++++++++--------- misc/profiles2/lookups.dat | 2 + misc/profiles2/shortest.brf | 50 +++++++++--------- misc/profiles2/trekking.brf | 43 +++++++-------- misc/profiles2/vm-forum-liegerad-schnell.brf | 44 ++++++++-------- misc/profiles2/vm-forum-velomobil-schnell.brf | 44 ++++++++-------- 8 files changed, 172 insertions(+), 158 deletions(-) diff --git a/misc/profiles2/fastbike-asia-pacific.brf b/misc/profiles2/fastbike-asia-pacific.brf index 3e994e5..6d0e528 100644 --- a/misc/profiles2/fastbike-asia-pacific.brf +++ b/misc/profiles2/fastbike-asia-pacific.brf @@ -63,11 +63,13 @@ assign defaultaccess = assign bikeaccess or any_cycleroute switch bicycle= - switch vehicle= - defaultaccess - switch or vehicle=private vehicle=no - 0 - 1 + switch bicycle_road=yes + 1 + switch vehicle= + defaultaccess + switch or vehicle=private vehicle=no + 0 + 1 not or bicycle=private or bicycle=no bicycle=dismount # @@ -145,7 +147,7 @@ assign costfactor switch tracktype=grade3 10.0 switch tracktype=grade4 20.0 switch tracktype=grade5 30.0 - switch bicycle=designated 2.0 + switch or bicycle=designated bicycle_road=yes 2.0 switch ispaved 2.0 100.0 10.0 @@ -153,25 +155,25 @@ assign costfactor 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 ( isresidentialorliving ) 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 + 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 ( isresidentialorliving ) then 6 + else if ( highway=service ) then 6 + else if ( highway=cycleway ) then 6 + else if ( or bicycle=designated bicycle_road=yes ) 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 diff --git a/misc/profiles2/fastbike-lowtraffic.brf b/misc/profiles2/fastbike-lowtraffic.brf index 84e6d43..7e3b22e 100644 --- a/misc/profiles2/fastbike-lowtraffic.brf +++ b/misc/profiles2/fastbike-lowtraffic.brf @@ -48,7 +48,8 @@ assign bikeaccess = if any_cycleroute then true else if bicycle= then ( - if vehicle= then + if bicycle_road=yes then true + else if vehicle= then ( if access= then not or motorroad=yes highway=footway else if access=private|no then false @@ -169,7 +170,7 @@ assign costfactor switch tracktype=grade3 10.0 switch tracktype=grade4 20.0 switch tracktype=grade5 30.0 - switch bicycle=designated 1.3 + switch or bicycle=designated bicycle_road=yes 1.3 switch ispaved 2.0 100.0 10.0 @@ -177,25 +178,25 @@ assign costfactor 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 ( isresidentialorliving ) 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 + 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 ( isresidentialorliving ) then 6 + else if ( highway=service ) then 6 + else if ( highway=cycleway ) then 6 + else if ( or bicycle=designated bicycle_road=yes ) 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 diff --git a/misc/profiles2/fastbike.brf b/misc/profiles2/fastbike.brf index 1bff5d6..93747de 100644 --- a/misc/profiles2/fastbike.brf +++ b/misc/profiles2/fastbike.brf @@ -58,11 +58,13 @@ assign defaultaccess assign bikeaccess or any_cycleroute switch bicycle= - switch vehicle= - defaultaccess - switch or vehicle=private vehicle=no - 0 - 1 + switch bicycle_road=yes + 1 + switch vehicle= + defaultaccess + switch or vehicle=private vehicle=no + 0 + 1 not or bicycle=private or bicycle=no bicycle=dismount # @@ -140,7 +142,7 @@ assign costfactor switch tracktype=grade3 10.0 switch tracktype=grade4 20.0 switch tracktype=grade5 30.0 - switch bicycle=designated 2.0 + switch or bicycle=designated bicycle_road=yes 2.0 switch ispaved 2.0 100.0 10.0 @@ -148,25 +150,25 @@ assign costfactor 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 ( isresidentialorliving ) 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 + 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 ( isresidentialorliving ) then 6 + else if ( highway=service ) then 6 + else if ( highway=cycleway ) then 6 + else if ( or bicycle=designated bicycle_road=yes ) 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 diff --git a/misc/profiles2/lookups.dat b/misc/profiles2/lookups.dat index e84e559..10bc38d 100644 --- a/misc/profiles2/lookups.dat +++ b/misc/profiles2/lookups.dat @@ -640,6 +640,8 @@ sidewalk:bicycle;0000000439 yes designated sidewalk:left:bicycle;0000001722 yes designated sidewalk:right:bicycle;0000002667 yes designated +bicycle_road;0000006521 yes designated + ---context:node highway;0001314954 bus_stop diff --git a/misc/profiles2/shortest.brf b/misc/profiles2/shortest.brf index 97667fe..4295e29 100644 --- a/misc/profiles2/shortest.brf +++ b/misc/profiles2/shortest.brf @@ -36,11 +36,13 @@ assign defaultaccess assign bikeaccess or any_cycleroute switch bicycle= - switch vehicle= - defaultaccess - switch or vehicle=private vehicle=no - 0 - 1 + switch bicycle_road=yes + 1 + switch vehicle= + defaultaccess + switch or vehicle=private vehicle=no + 0 + 1 not or bicycle=private or bicycle=no bicycle=dismount # @@ -71,25 +73,25 @@ assign isresidentialorliving = or highway=residential|living_street living_stree 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 ( isresidentialorliving ) 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 + 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 ( isresidentialorliving ) then 6 + else if ( highway=service ) then 6 + else if ( highway=cycleway ) then 6 + else if ( or bicycle=designated bicycle_road=yes ) 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... diff --git a/misc/profiles2/trekking.brf b/misc/profiles2/trekking.brf index e284d86..b4d3543 100644 --- a/misc/profiles2/trekking.brf +++ b/misc/profiles2/trekking.brf @@ -52,7 +52,7 @@ assign is_ldcr = if ignore_cycleroutes then false else any_cycleroute -assign isbike = or bicycle=yes or or bicycle=permissive bicycle=designated lcn=yes +assign isbike = or bicycle_road=yes or bicycle=yes or or bicycle=permissive bicycle=designated lcn=yes assign ispaved = surface=paved|asphalt|concrete|paving_stones assign isunpaved = not or surface= or ispaved surface=fine_gravel|cobblestone assign probablyGood = or ispaved and isbike not isunpaved @@ -102,7 +102,8 @@ assign bikeaccess = if any_cycleroute then true else if bicycle= then ( - if vehicle= then defaultaccess + if bicycle_road=yes then true + else if vehicle= then defaultaccess else not vehicle=private|no ) else not bicycle=private|no|dismount @@ -246,25 +247,25 @@ assign costfactor 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 ( isresidentialorliving ) 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 + 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 ( isresidentialorliving ) then 6 + else if ( highway=service ) then 6 + else if ( highway=cycleway ) then 6 + else if ( or bicycle=designated bicycle_road=yes ) 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... diff --git a/misc/profiles2/vm-forum-liegerad-schnell.brf b/misc/profiles2/vm-forum-liegerad-schnell.brf index 2f2a9b4..414e0a0 100644 --- a/misc/profiles2/vm-forum-liegerad-schnell.brf +++ b/misc/profiles2/vm-forum-liegerad-schnell.brf @@ -50,7 +50,7 @@ assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route assign nodeaccessgranted or any_cycleroute lcn=yes assign cycleway - or highway=cycleway and highway=path|footway bicycle=designated|yes + or bicycle_road=yes or highway=cycleway and highway=path|footway bicycle=designated|yes assign footway or highway=footway and highway=path foot=designated|yes @@ -99,8 +99,10 @@ assign defaultaccess assign bikeaccess or any_cycleroute switch bicycle= - switch vehicle= - defaultaccess + switch bicycle_road=yes + 1 + switch vehicle= + defaultaccess switch or vehicle=private vehicle=no 0 1 @@ -355,25 +357,25 @@ assign downhillcostfactor 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 + 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 ( or highway=residential|living_street living_street=yes ) 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 if ( highway=service ) then 6 + else if ( highway=cycleway ) then 6 + else if ( or bicycle=designated bicycle_road=yes ) 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 diff --git a/misc/profiles2/vm-forum-velomobil-schnell.brf b/misc/profiles2/vm-forum-velomobil-schnell.brf index 4b35602..bfa2ebd 100644 --- a/misc/profiles2/vm-forum-velomobil-schnell.brf +++ b/misc/profiles2/vm-forum-velomobil-schnell.brf @@ -50,7 +50,7 @@ assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route assign nodeaccessgranted or any_cycleroute lcn=yes assign cycleway - or highway=cycleway and highway=path|footway bicycle=designated|yes + or bicycle_road=yes or highway=cycleway and highway=path|footway bicycle=designated|yes assign footway or highway=footway and highway=path foot=designated|yes @@ -99,8 +99,10 @@ assign defaultaccess assign bikeaccess or any_cycleroute switch bicycle= - switch vehicle= - defaultaccess + switch bicycle_road=yes + 1 + switch vehicle= + defaultaccess switch or vehicle=private vehicle=no 0 1 @@ -355,25 +357,25 @@ assign downhillcostfactor 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 + 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 ( or highway=residential|living_street living_street=yes ) 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 if ( highway=service ) then 6 + else if ( highway=cycleway ) then 6 + else if ( or bicycle=designated bicycle_road=yes ) 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