From 35f4e3312e340c5c3f40e3090bdb0aa22dbd22e3 Mon Sep 17 00:00:00 2001 From: Totorrr <65602119+Totorrr@users.noreply.github.com> Date: Sat, 22 Oct 2022 00:19:22 +0200 Subject: [PATCH 1/2] Remove cycleroute always having access granted Some bicycle routes can have portions which are not accessible. Potential reasons for this: - temporary construction work on the ways (sometimes for months), - local access change without simultaneous update of bicycle route relation (lack of mapper's knowledge or lack of time to redefine an updated route), - ... This commit changes the trekking profile so that being on a cycle route does not automatically mean "access granted" for bicycles. The normal access checkings are used instead. However, the accesspenalty is set to 15 if the no-access way belongs to such a route, so that the way is not completely forbidden if there is no other alternative unavailable. --- misc/profiles2/trekking.brf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/profiles2/trekking.brf b/misc/profiles2/trekking.brf index 8a4b94d..3ccf23d 100644 --- a/misc/profiles2/trekking.brf +++ b/misc/profiles2/trekking.brf @@ -112,8 +112,7 @@ assign defaultaccess = # calculate logical bike access # assign bikeaccess = - if any_cycleroute then true - else if bicycle= then + if bicycle= then ( if bicycle_road=yes then true else if vehicle= then ( if highway=footway then false else defaultaccess ) @@ -137,6 +136,7 @@ assign footaccess = assign accesspenalty = if bikeaccess then 0 else if footaccess then 4 + else if any_cycleroute then 15 else 10000 # From e2c68117616c6d269ab6ab72adc75ab18748cffb Mon Sep 17 00:00:00 2001 From: Totorrr <65602119+Totorrr@users.noreply.github.com> Date: Sat, 22 Oct 2022 00:51:23 +0200 Subject: [PATCH 2/2] Remove cycleroute always having access granted Some bicycle routes can have portions which are not accessible. Potential reasons for this: - temporary construction work on the ways (sometimes for months), - local access change without simultaneous update of bicycle route relation (lack of mapper's knowledge or lack of time to redefine an updated route), - ... This commit changes the fastbike profile so that being on a cycle route does not automatically mean "access granted" for bicycles. The normal access checkings are used instead. However, the accesspenalty is set to 15 if the no-access way belongs to such a route, so that the way is not completely forbidden if there is no other alternative unavailable. --- misc/profiles2/fastbike.brf | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/misc/profiles2/fastbike.brf b/misc/profiles2/fastbike.brf index 36455cf..f4c09b7 100644 --- a/misc/profiles2/fastbike.brf +++ b/misc/profiles2/fastbike.brf @@ -87,14 +87,13 @@ assign defaultaccess # calculate logical bike access # assign bikeaccess = - or any_cycleroute - switch bicycle= - switch bicycle_road=yes - true - switch vehicle= - ( if highway=footway then false else defaultaccess ) - not vehicle=private|no - not or bicycle=private or bicycle=no bicycle=dismount + switch bicycle= + switch bicycle_road=yes + true + switch vehicle= + ( if highway=footway then false else defaultaccess ) + not vehicle=private|no + not or bicycle=private or bicycle=no bicycle=dismount # # calculate logical foot access @@ -115,7 +114,9 @@ assign accesspenalty 0 switch footaccess 6 - 10000 + switch any_cycleroute + 15 + 10000 # # handle one-ways. On primary roads, wrong-oneways should