From 7810bcb4513deb29c84f9541770e27ce32f1f1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 1 Dec 2024 08:21:16 +0100 Subject: [PATCH] cycleway_types: instead of 'crossing' introduce a more general 'otherInfrastructure' --- cycleway_types.yaml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/cycleway_types.yaml b/cycleway_types.yaml index c3a664e..d9f0bb8 100644 --- a/cycleway_types.yaml +++ b/cycleway_types.yaml @@ -33,7 +33,8 @@ feature: {% set leftCycle = '' %}{% set rightCycle = '' %} {% if tags.cycleway %} - {% if tags.cycleway in ['crossing'] %} + {% if const.otherInfrastructure[tags.cycleway] %} + {# skip #} {% elseif (tags.oneway in ['yes', 1] and map.driving_side == 'right') or (tags.oneway in [-1] and map.driving_side == 'left') %} {{ tags.cycleway|debug }} {% if tags.cycleway matches '/^opposite/' %} @@ -84,8 +85,8 @@ feature: bridge, {% endif %} - {% if tags.cycleway in ['crossing'] or tags.path in ['crossing'] %} - crossing, + {% if const.otherInfrastructure[tags.cycleway|default(tags.path)] %} + other, {% endif %} {% if tags.segregated %} @@ -287,12 +288,15 @@ feature: zIndex: |- {{ tags.layer|default(0) }} - style:crossing: + style:other: width: | - {{ const.types[type].width + 4 }} - color: black - lineCap: butt - dashArray: "4,4" + {{ const.types[type].width + const.otherInfrastructure[tags.cycleway].extraWidth }} + color: | + {{ const.otherInfrastructure[tags.cycleway].color }} + lineCap: | + {{ const.otherInfrastructure[tags.cycleway].lineCap|default('round') }} + dashArray: | + {{ const.otherInfrastructure[tags.cycleway].dashArray|default('') }} zIndex: |- {{ tags.layer|default(0) - 0.1 }} @@ -317,11 +321,11 @@ feature: body: |