Skip to content

Commit

Permalink
new lookups abrensch#416
Browse files Browse the repository at this point in the history
  • Loading branch information
afischerdev committed Apr 16, 2022
1 parent 17c9873 commit 38d32f5
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 27 deletions.
4 changes: 2 additions & 2 deletions misc/profiles2/car-vario.brf
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ assign initialcost =

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
assign isbadoneway = if reversedirection=yes then ( if oneway= then junction=roundabout else oneway=yes|1 ) else oneway=-1
assign onewayspeedlimit = if isbadoneway then 0 else 999

assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link
Expand Down Expand Up @@ -221,7 +221,7 @@ assign priorityclassifier =
# some more classifying bits used for voice hint generation...

assign isgoodoneway = if reversedirection=yes then oneway=-1
else if oneway= then junction=roundabout else oneway=yes|true|1
else if oneway= then junction=roundabout else oneway=yes|1
assign isroundabout = junction=roundabout
assign isgoodforcars = if greater priorityclassifier 6 then true
else if or isresidentialorliving highway=service then true
Expand Down
6 changes: 3 additions & 3 deletions misc/profiles2/fastbike-verylowtraffic.brf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ assign any_cycleway or cycleway=track|lane|shared_lane|shared cycleway_right
# as soon it is supported in lookup, add ==> bicycle_road=yes in any_cycleway

# in relation with "route=bicycle" ?
assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
assign any_cycleroute or network=icn or network=ncn or network=rcn network=lcn

assign nodeaccessgranted or any_cycleroute lcn=yes

Expand Down Expand Up @@ -132,7 +132,7 @@ assign badoneway =
if reversedirection=yes then
if oneway:bicycle=yes then true
else if oneway= then junction=roundabout
else oneway=yes|true|1
else oneway=yes|1
else oneway=-1

assign onewaypenalty =
Expand Down Expand Up @@ -378,7 +378,7 @@ assign priorityclassifier =

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
else if oneway= then junction=roundabout else oneway=yes|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
Expand Down
6 changes: 3 additions & 3 deletions misc/profiles2/fastbike.brf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ assign turnInstructionRoundabouts = true # %turnInstructionRoundabouts% | Set

---context:way # following code refers to way-tags

assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
assign any_cycleroute or network=icn or network=ncn or network=rcn network=lcn
assign nodeaccessgranted or any_cycleroute lcn=yes

assign ispaved or surface=paved or surface=asphalt or surface=concrete or surface=paving_stones surface=sett
Expand Down Expand Up @@ -127,7 +127,7 @@ assign badoneway =
if reversedirection=yes then
if oneway:bicycle=yes then true
else if oneway= then junction=roundabout
else oneway=yes|true|1
else oneway=yes|1
else oneway=-1

assign onewaypenalty =
Expand Down Expand Up @@ -244,7 +244,7 @@ assign priorityclassifier =

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
else if oneway= then junction=roundabout else oneway=yes|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
Expand Down
21 changes: 10 additions & 11 deletions misc/profiles2/hiking-beta.brf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

---context:global

assign avoidPeaks 1

assign consider_elevation 1 # 0 as default, otherwise less interesting flat roads are chosen.
assign shortest_way 0 # 0 as default

Expand Down Expand Up @@ -84,18 +86,15 @@ assign SAC_K2_6 add ( multiply ( add SAC_K2_5 1.0 ) SAC_K20 ) -1.0
assign ispaved or surface=paved or surface=asphalt or surface=concrete surface=paving_stones
assign isunpaved not or surface= or ispaved or surface=fine_gravel surface=cobblestone

assign any_hiking_route or route=hiking or route_hiking_iwn=yes
or route_hiking_nwn=yes or route_hiking_rwn=yes
or route_hiking_lwn=yes or route_hiking_=yes
or route_foot_=yes or route_foot_nwn=yes
or route_foot_rwn=yes route_foot_lwn=yes
assign any_hiking_route or route=hiking or network=iwn
or network=nwn or network=rwn network=lwn

assign any_cycleroute =
if route_bicycle_icn=yes then true
else if route_bicycle_ncn=yes then true
else if route_bicycle_rcn=yes then true
else if route_bicycle_lcn=yes then true
else false
if network=icn then true
else if network=ncn then true
else if network=rcn then true
else if network=lcn then true
else false

assign is_ldhr and any_hiking_route hr_preferred
assign nodeaccessgranted any_hiking_route
Expand Down Expand Up @@ -158,7 +157,7 @@ else if or sac_scale=demanding_alpine_hiking mtb:scale=6 then 5
else if or sac_scale=alpine_hiking mtb:scale=5 then 4
else if or sac_scale=demanding_mountain_hiking mtb:scale=4 then 3
else if or sac_scale=mountain_hiking mtb:scale=3|2+ then 2
else if or sac_scale=hiking|T1-hiking|yes mtb:scale=2|1+|2- then 1
else if or sac_scale=hiking|yes mtb:scale=2|1+|2- then 1
else 0

assign SAC_scale_access # if SAC_scale_limit < SAC then true else false
Expand Down
4 changes: 2 additions & 2 deletions misc/profiles2/moped.brf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ assign onewaypenalty
switch switch reversedirection=yes
switch oneway=
junction=roundabout
or oneway=yes or oneway=true oneway=1
or oneway=yes oneway=1
oneway=-1
10000
0.0
Expand Down Expand Up @@ -129,7 +129,7 @@ assign priorityclassifier =

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
else if oneway= then junction=roundabout else oneway=yes|1
assign isroundabout = junction=roundabout
assign isgoodforcars = if greater priorityclassifier 6 then true
else if ( or isresidentialorliving highway=service ) then true
Expand Down
6 changes: 3 additions & 3 deletions misc/profiles2/vm-forum-liegerad-schnell.brf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ assign elevationbufferreduce 1 # im Bereich zwischen elevationpenaltybuffer und
# Parameter für die Wege
#zusätzliche Kosten in Meter für jeden Streckenabschnitt

assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
assign any_cycleroute or network=icn or network=ncn or network=rcn network=lcn
assign nodeaccessgranted or any_cycleroute lcn=yes

assign cycleway
Expand Down Expand Up @@ -92,7 +92,7 @@ assign initialcost
assign oneway
switch oneway=
junction=roundabout
or oneway=yes or oneway=true oneway=1
or oneway=yes oneway=1

assign onewaypenalty
switch switch reversedirection=yes oneway oneway=-1
Expand Down Expand Up @@ -398,7 +398,7 @@ assign priorityclassifier =

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
else if oneway= then junction=roundabout else oneway=yes|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
Expand Down
6 changes: 3 additions & 3 deletions misc/profiles2/vm-forum-velomobil-schnell.brf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ assign elevationbufferreduce 1 # im Bereich zwischen elevationpenaltybuffer und
# Parameter für die Wege
#zusätzliche Kosten in Meter für jeden Streckenabschnitt

assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
assign any_cycleroute or network=icn or network=ncn or network=rcn network=lcn
assign nodeaccessgranted or any_cycleroute lcn=yes

assign cycleway
Expand Down Expand Up @@ -92,7 +92,7 @@ assign initialcost
assign oneway
switch oneway=
junction=roundabout
or oneway=yes or oneway=true oneway=1
or oneway=yes oneway=1

assign onewaypenalty
switch switch reversedirection=yes oneway oneway=-1
Expand Down Expand Up @@ -398,7 +398,7 @@ assign priorityclassifier =

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
else if oneway= then junction=roundabout else oneway=yes|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
Expand Down

0 comments on commit 38d32f5

Please sign in to comment.