From 8f403f9c00721ab8b210faf13ad1b805069fec3f Mon Sep 17 00:00:00 2001 From: Alex Kane <1998alexkane@gmail.com> Date: Fri, 1 Jul 2022 23:15:19 +0200 Subject: [PATCH 1/4] Show cycleway without oneway tag as oneway=no --- CHANGELOG.md | 2 ++ views.sql | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 869e4ff..200f554 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Ensure bicycle crossing are drawn at crossings with highway=service. See #503. * Handle `cycleway:left|right:oneway=-1` as aliases of `cycleway:left|right=opposite_lane`. See #555. +* Cycleways and bicycle-designated pats with no oneway tag are now drawn like a + cycleway/path with oneway=no tag. See #601 ## v0.6 diff --git a/views.sql b/views.sql index ae5a84f..3d12cf0 100644 --- a/views.sql +++ b/views.sql @@ -113,14 +113,15 @@ CREATE VIEW cyclosm_ways AS END AS segregated, CASE WHEN tags->'oneway:bicycle' IS NOT NULL THEN tags->'oneway:bicycle' - WHEN highway='cycleway' AND oneway IS NOT NULL THEN oneway WHEN tags->'cycleway' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') OR tags->'cycleway:both' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') OR tags->'cycleway:left' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') OR tags->'cycleway:right' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') OR tags->'cycleway:left:oneway'='-1' OR tags->'cycleway:right:oneway'='-1' THEN 'no' - ELSE NULL + WHEN oneway IN ('yes', '-1') THEN oneway + WHEN junction IN ('roundabout') AND (oneway IS NULL OR NOT oneway IN ('no', 'reversible')) THEN 'yes' + ELSE 'no' END AS oneway_bicycle, COALESCE( tags->'ramp:bicycle', From ed738552d83195d9e2b53b35356b4131d0da857b Mon Sep 17 00:00:00 2001 From: Lucas Verney Date: Wed, 18 Jan 2023 18:53:27 +0100 Subject: [PATCH 2/4] Fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 200f554..a670214 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Ensure bicycle crossing are drawn at crossings with highway=service. See #503. * Handle `cycleway:left|right:oneway=-1` as aliases of `cycleway:left|right=opposite_lane`. See #555. -* Cycleways and bicycle-designated pats with no oneway tag are now drawn like a +* Cycleways and bicycle-designated paths with no oneway tag are now drawn like a cycleway/path with oneway=no tag. See #601 From b5a1b3e88e9a81832a41d8962315d7e32d852513 Mon Sep 17 00:00:00 2001 From: Lucas Verney Date: Sat, 21 Jan 2023 14:57:39 +0100 Subject: [PATCH 3/4] Update views.sql --- views.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views.sql b/views.sql index 3d12cf0..1f91a47 100644 --- a/views.sql +++ b/views.sql @@ -49,7 +49,7 @@ CREATE VIEW cyclosm_ways AS END AS cyclestreet, CASE WHEN oneway IN ('yes', '-1') THEN oneway - WHEN junction IN ('roundabout') AND (oneway IS NULL OR NOT oneway IN ('no', 'reversible')) THEN 'yes' + WHEN junction IN ('roundabout') AND (oneway IS NULL OR oneway NOT IN ('no', 'reversible')) THEN 'yes' ELSE 'no' END AS oneway, CASE From d64e6fdfcdc6d359cf32628891a0e5371a3b03b6 Mon Sep 17 00:00:00 2001 From: Lucas Verney Date: Sat, 21 Jan 2023 14:58:29 +0100 Subject: [PATCH 4/4] Update views.sql --- views.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views.sql b/views.sql index 1f91a47..c3111c3 100644 --- a/views.sql +++ b/views.sql @@ -120,7 +120,7 @@ CREATE VIEW cyclosm_ways AS OR tags->'cycleway:left:oneway'='-1' OR tags->'cycleway:right:oneway'='-1' THEN 'no' WHEN oneway IN ('yes', '-1') THEN oneway - WHEN junction IN ('roundabout') AND (oneway IS NULL OR NOT oneway IN ('no', 'reversible')) THEN 'yes' + WHEN junction IN ('roundabout') AND (oneway IS NULL OR oneway NOT IN ('no', 'reversible')) THEN 'yes' ELSE 'no' END AS oneway_bicycle, COALESCE(