From 547c249af9ea08ddb8a70415dca2e3cc2b633d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 14 Jan 2024 07:34:37 +0100 Subject: [PATCH] cycle_directions: copy category from test repository --- cycle_directions.yaml | 72 +++++++++++++++++++++++++++++++++++++++++++ index.json | 3 ++ lang/en.json | 1 + 3 files changed, 76 insertions(+) create mode 100644 cycle_directions.yaml diff --git a/cycle_directions.yaml b/cycle_directions.yaml new file mode 100644 index 0000000..e5c9973 --- /dev/null +++ b/cycle_directions.yaml @@ -0,0 +1,72 @@ +name: + de: Radwegrichtungen + en: Cycleway Directions +query: + 14: |- + ( + way[highway=cycleway]; + way[cycleway]; + way["cycleway:left"]; + way["cycleway:right"]; + way[highway][oneway]; + way['oneway:bicycle']; + ) +feature: + pre: |- + {% set oneway = 0 %} + {% if tags.oneway in [ 'yes', '1' ] %}{% set oneway = 1 %} + {% elseif tags.oneway in [ '-1' ] %}{% set oneway = -1 %} + {% endif %} + + {% set driving_side = 'right' %} + markerSymbol: null + listMarkerSymbol: line + styles: '{% if oneway != 0 %}default,{% endif %}left,right' + style: + width: 0 + pattern: arrowHead + pattern-offset: 17 + pattern-repeat: 25 + pattern-polygon: true + pattern-pixelSize: |- + {% if tags.highway == "cycleway" %}7{% else %}9{% endif %} + pattern-path-color: |- + {% if tags.highway == "cycleway" %}#007f00{% else %}#000000{% endif %} + pattern-path-width: 1 + pattern-path-fillOpacity: 1 + pattern-angleCorrection: |- + {% if oneway == -1 %}180{% else %}0{% endif %} + style:highlight: null + style:left: + width: 0 + pattern: |- + {% if tags.cycleway in [ "opposite", "opposite_lane", "opposite_track" ] or attribute(tags, "cycleway:left") in [ "opposite", "opposite_lane", "opposite_track" ] or attribute(tags, "cycleway:right") in [ "opposite", "opposite_lane", "opposite_track" ] or attribute(tags, "oneway:bicycle") == "no" %}arrowHead{% endif %} + pattern-offset: 0 + pattern-repeat: 25 + pattern-polygon: true + pattern-pixelSize: 7 + pattern-path-width: 1 + pattern-path-color: |- + {% if tags.oneway in [ 'yes', '1' ] and (tags.cycleway in [ 'opposite_track' ] or attribute(tags, 'cycleway:left') in [ 'opposite_track' ] or attribute(tags, 'cycleway:right') in [ 'opposite_track' ]) %} + #00af00 + {% elseif tags.oneway in [ 'yes', '1' ] and (tags.cycleway in [ 'opposite_lane', 'opposite' ] or attribute(tags, 'cycleway:left') in [ 'opposite', 'opposite_lane' ] or attribute(tags, 'cycleway:right') in [ 'opposite', 'opposite_lane' ] or attribute(tags, 'oneway:bicycle') == 'no') %} + #00ff00 + {% endif %} + pattern-path-fillOpacity: 1 + pattern-angleCorrection: |- + {% if oneway == -1 %}0{% else %}180{% endif %} +info: |- + + + + + + + + + + + + + +
{{ markerLine(evaluate({ "oneway": "yes", "highway": "cycleway" }))|raw }}{{ tagTrans('highway', 'cycleway') }}
{{ markerLine(evaluate({ "oneway": "yes", "cycleway": "track" }))|raw }}{{ tagTrans('cycleway', 'track') }}
{{ markerLine(evaluate({ "oneway": "yes", "cycleway": "lane" }))|raw }}{{ tagTrans('cycleway', 'lane') }}
diff --git a/index.json b/index.json index 556f750..9b5999b 100644 --- a/index.json +++ b/index.json @@ -182,6 +182,9 @@ { "id": "cycle_amenities" }, + { + "id": "cycle_directions" + }, { "id": "cycle_routes" } diff --git a/lang/en.json b/lang/en.json index 0c03322..f0ea8a2 100644 --- a/lang/en.json +++ b/lang/en.json @@ -24,6 +24,7 @@ "category:culture_religion": "Culture and Religion", "category:culture-media": "Culture - Media/Wikidata", "category:cycle_amenities": "Amenities", + "category:cycle_directions": "Directions", "category:cycle_routes": "Cycle Routes", "category:developable_areas": "Developable Areas", "category:developments": "Planning and Construction",