From c77faef34ef46bb41f9bccd639ef7e34088290b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 14 Oct 2022 21:44:44 +0200 Subject: [PATCH 01/13] New categories in Transport/Walking: footways, kerbs --- footways.yaml | 245 ++++++++++++++++++++++++++++++++++++++++++++++++++ index.json | 6 ++ kerbs.yaml | 111 +++++++++++++++++++++++ 3 files changed, 362 insertions(+) create mode 100644 footways.yaml create mode 100644 kerbs.yaml diff --git a/footways.yaml b/footways.yaml new file mode 100644 index 0000000..a19c23b --- /dev/null +++ b/footways.yaml @@ -0,0 +1,245 @@ +query: + 15: | + ( + way[highway~"^(footway|pedestrian|steps|path)$"]; + way[highway=cycleway][foot~"^(yes|designated)$"]; + way[footway]; + way[sidewalk~"^(yes|both|left|right|no|none)$"]; + way["sidewalk:left"~"(yes|no|separate)$"]; + way["sidewalk:right"~"(yes|no|separate)$"]; + way["sidewalk:both"~"(yes|no|separate)$"]; + nwr["railway"="platform"]; + node[highway=crossing]; + ) +feature: + pre: | + {% set sides = ['default'] %} + {% set sidewalk_left = null %}{% set sidewalk_right = null %} + {% set category = tags.highway %} + + {% if attribute(tags, 'sidewalk:both') == 'yes' or tags.sidewalk in ['yes', 'both', 'left', 'both', 'right'] or tags.footway == 'sidewalk' %} + {% set category = 'sidewalk' %} + {% endif %} + + {% if tags.highway in ['pedestrian', 'footway','steps','path','cycleway'] %} + {% set sides = sides|merge(['main']) %} + {% endif %} + + {% if tags.railway in ['platform'] %} + {% set sides = sides|merge(['main']) %} + {% set category = 'platform' %} + {% endif %} + + {% set foot = false %} + {% if tags.highway not in ['pedestrian', 'footway', 'path'] and tags.foot in ['yes', 'designated'] %} + {% set foot = tags.foot %} + {% set sides = sides|merge(['foot']) %} + {% endif %} + + {% if tags.footway == 'crossing' %} + {% set category = 'crossing' %} + {% endif %} + + {% if attribute(tags, 'sidewalk:both') %} + {% set sidewalk_left = attribute(tags, 'sidewalk:both') %} + {% set sides = sides|merge(['leftr', 'rightr']) %} + {% endif %} + + {% if attribute(tags, 'sidewalk:left') %} + {% set sidewalk_left = attribute(tags, 'sidewalk:left') %} + {% set sides = sides|merge(['leftr']) %} + {% endif %} + + {% if attribute(tags, 'sidewalk:left') == 'yes' or attribute(tags, 'sidewalk:both') == 'yes' or tags.sidewalk in ['left', 'both'] %} + {% set sidewalk_left = 'yes' %} + {% set sides = sides|merge(['leftr', 'left']) %} + {% endif %} + + {% if attribute(tags, 'sidewalk:right') %} + {% set sidewalk_right = attribute(tags, 'sidewalk:right') %} + {% set sides = sides|merge(['rightr']) %} + {% endif %} + + {% if attribute(tags, 'sidewalk:right') == 'yes' or attribute(tags, 'sidewalk:both') == 'yes' or tags.sidewalk in ['right', 'both'] %} + {% set sidewalk_right = 'yes' %} + {% set sides = sides|merge(['rightr', 'right']) %} + {% endif %} + + {% if type == 'node' %} + {% set sides = ['node'] %} + {% endif %} + description: | + {% if tags.footway %} + {{ tagTrans('footway', tags.footway) }} + {% else %} + {{ tagTrans('highway', tags.highway) }} + {% endif %} + markerSymbol: "" + listMarkerSymbol: | + {% if tags.area == 'yes' %}polygon{% else %}line{% endif %} + style: + opacity: 0 + fillOpacity: 0 + width: 5 + style:node: + width: 0 + radius: 5 + fillOpacity: 1 + fill: true + color: | + {{ const.categories[category].color }} + style:main: + fill: | + {% if tags.area == 'yes' %}true{% else %}false{% endif %} + width: | + {% if tags.area == 'yes' %} + 1 + {% elseif foot and tags.segregated == 'yes' %} + 2 + {% else %} + {{ const.categories[category].width|default(3) }} + {% endif %} + color: | + {{ const.categories[category].color }} + dashArray: | + {% if tags.highway == 'steps' or (foot and tags.segregated != 'yes') %} + 3,3 + {% endif %} + lineCap: | + {% if tags.highway == 'steps' or (foot and tags.segregated != 'yes') %}butt{% else %}round{% endif %} + offset: | + {% if foot and tags.segregated == 'yes' %}1{% else %}0{% endif %} + style:foot: + fill: false + width: | + {% if foot and tags.segregated == 'yes' %} + 2 + {% else %} + 3 + {% endif %} + color: | + {{ const.categories.footway.color }} + dashArray: | + {% if foot and tags.segregated != 'yes' %} + 3,3 + {% endif %} + dashOffset: 3 + lineCap: | + {% if foot and tags.segregated != 'yes' %}butt{% else %}round{% endif %} + offset: | + {% if foot and tags.segregated == 'yes' %}-1{% else %}0{% endif %} + style:left: + width: 3 + offset: | + {{ -5 / map.metersPerPixel }} + color: | + {{ const.categories.sidewalk.color }} + style:right: + width: 3 + offset: | + {{ 5 / map.metersPerPixel }} + color: | + {{ const.categories.sidewalk.color }} + + style:leftr: + width: | + {{ sidewalk_left ? 5 / map.metersPerPixel : 0 }} + offset: | + {{ -2.5 / map.metersPerPixel }} + opacity: 0.3 + dashArray: '1,10' + lineCap: butt + color: | + {{ sidewalk_left in ['no', 'none'] ? '#000000' : const.categories.sidewalk.color }} + + style:rightr: + width: | + {{ sidewalk_right ? 5 / map.metersPerPixel : 0 }} + offset: | + {{ 2.5 / map.metersPerPixel }} + opacity: 0.3 + dashArray: '1,10' + lineCap: butt + color: | + {{ sidewalk_right in ['no', 'none'] ? '#000000' : const.categories.sidewalk.color }} + + styles: | + {{ sides|join(',') }} +info: | + + {% for k, d in const.categories if k != 'cycleway' %} + + + + + {% endfor %} + + + + + + + + + + + + +
{{ markerLine({ + width: d.width|default(3), + color: d.color, + dashArray: d.dashArray + }) }}{{ tagTrans(d.key|default('highway'), k) }}
{{ markerCircle({ + width: 0, + radius: 5, + fillOpacity: 1, + fill: true, + color: const.categories.crossing.color + }) }}{{ tagTrans('highway', 'crossing') }}
{{ markerLine({ + styles: 'default,foot', + style: { + width: 4, + color: const.categories.cycleway.color, + dashArray: '3,3' + }, + 'style:foot': { + width: 4, + color: const.categories.footway.color, + dashArray: '3,3', + dashOffset: 3 + } + }) }}highway=cycleway segregated=no
{{ markerLine({ + styles: 'default,foot', + style: { + width: 2, + color: const.categories.cycleway.color, + offset: -1 + }, + 'style:foot': { + width: 2, + color: const.categories.footway.color, + offset: 1 + } + }) }}highway=cycleway segregated=yes
+const: + categories: + sidewalk: + color: '#ff007f' + key: footway + pedestrian: + color: '#ff00c8' + width: 5 + footway: + color: '#ab00ff' + path: + color: '#ee922d' + steps: + color: '#ab00ff' + dashArray: '3,3' + crossing: + color: '#964e00' + cycleway: + color: '#002aff' + platform: + key: railway + color: '#00ff00' diff --git a/index.json b/index.json index 6f11775..556f750 100644 --- a/index.json +++ b/index.json @@ -157,6 +157,12 @@ }, { "id": "hiking_routes" + }, + { + "id": "footways" + }, + { + "id": "kerbs" } ] }, diff --git a/kerbs.yaml b/kerbs.yaml new file mode 100644 index 0000000..e2d995f --- /dev/null +++ b/kerbs.yaml @@ -0,0 +1,111 @@ +query: + 14: (way[kerb];way[barrier=kerb];node[kerb];node[barrier=kerb];) +name: + en: Kerbs +feature: + pre: | + {% set kerb = 'unknown' %} + {% if const.kerb[tags.kerb] %} + {% set kerb = tags.kerb %} + {% endif %} + + {% set wheelchair = 'unknown' %} + {% if const.wheelchair[tags.wheelchair] %} + {% set wheelchair = tags.wheelchair %} + {% endif %} + + description: | + {{ tagTrans('barrier', 'kerb') }} + body: | + + markerSymbol: + listMarkerSymbol: | + {% if type == 'way' %} + line + {% else %} + {{ markerCircle({ radius: 5, width: 2, fillOpacity: 1, fillColor: const.kerb[kerb], color: const.wheelchair[wheelchair] }) }} + {% endif %} + details: | + {{ tags.kerb }} + {% if tags.height %}({{ tags.height }}){% endif %} + styles: | + {% if type == 'way' %} + default,marker + {% else %} + node + {% endif %} + style: + color: | + {{ const.kerb[kerb] }} + fill: | + {{ type == 'way' ? false : true }} + radius: 4 + fillOpacity: 1 + width: 2 + style:marker: + color: | + {{ const.kerb[kerb] }} + offset: 2 + width: 2 + fill: false + dashArray: 2,9 + style:node: + fillColor: | + {{ const.kerb[kerb] }} + fill: true + radius: 6 + fillOpacity: 1 + width: 2 + color: | + {{ const.wheelchair[wheelchair] }} +info: | + {{ tagTrans('barrier', 'kerb') }}: + + {% for v, color in const.kerb %} + + + + + {% endfor %} +
+ {{ markerLine({ styles: 'default,marker', style: { width: 2, color: color }, 'style:marker': { width: 2, offset: 2, color: color, dashArray: '2,9'} } ) }} + {{ markerCircle({ radius: 4, width: 2, fillOpacity: 1, color: color }) }} + {{ v == 'unknown' ? trans('unknown') : tagTrans('kerb', v) }}
+ {{ keyTrans('wheelchair') }}: + + {% for v, color in const.wheelchair %} + + + + + {% endfor %} +
+ {{ markerCircle({ radius: 6, width: 2, fillOpacity: 1, fillColor: '#000000', color: color }) }} + {{ v == 'unknown' ? trans('unknown') : tagTrans('kerb', v) }}
+const: + kerb: + flush: '#00af00' + lowered: '#007f7f' + no: '#000000' + raised: '#af0000' + rolled: '#af7f00' + unknown: '#7f7f7f' + wheelchair: + designated: '#00ff7f' + yes: '#00ff00' + no: '#ff0000' + limited: '#ffff00' + unknown: '#ffffff' From 12cd96ea40f661a87614178cdbc4464ff36242c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 14 Oct 2022 22:19:23 +0200 Subject: [PATCH 02/13] footway: list markers --- footways.yaml | 56 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/footways.yaml b/footways.yaml index a19c23b..caf73e8 100644 --- a/footways.yaml +++ b/footways.yaml @@ -71,12 +71,64 @@ feature: description: | {% if tags.footway %} {{ tagTrans('footway', tags.footway) }} - {% else %} + {% elseif tags.highway %} {{ tagTrans('highway', tags.highway) }} + {% elseif tags.railway %} + {{ tagTrans('railway', tags.railway) }} {% endif %} markerSymbol: "" listMarkerSymbol: | - {% if tags.area == 'yes' %}polygon{% else %}line{% endif %} + {% if tags.area == 'yes' %} + polygon + {% elseif 'node' in sides %} + {{ markerCircle({ width: 0, radius: 5, fillOpacity: 1, fill: true, color: const.categories[category].color }) }} + {% else %} + {{ markerLine({ + 'styles': sides|join(','), + 'style:main': { + width: foot and tags.segregated == 'yes' ? 2 : const.categories[category].width|default(3), + color: const.categories[category].color, + dashArray: tags.highway == 'steps' or (foot and tags.segregated != 'yes') ? '3,3' : '', + lineCap: tags.highway == 'steps' or (foot and tags.segregated != 'yes') ? 'butt' : 'round', + offset: foot and tags.segregated == 'yes' ? 1 : 0 + }, + 'style:foot': { + fill: false, + width: foot and tags.segregated == 'yes' ? 2 : 3, + color: const.categories.footway.color, + dashArray: foot and tags.segregated != 'yes' ? '3,3' : '', + dashOffset: 3, + lineCap: foot and tags.segregated != 'yes' ? 'butt' : 'round', + offset: foot and tags.segregated == 'yes' ? -1 : 0 + }, + 'style:left': { + width: 3, + offset: -6, + color: const.categories.sidewalk.color + }, + 'style:right': { + width: 3, + offset: 6, + color: const.categories.sidewalk.color + }, + 'style:leftr': { + width: sidewalk_left ? 5 : 0, + offset: -2.5, + opacity: 0.3, + dashArray: '1,10', + lineCap: butt, + color: sidewalk_left in ['no', 'none'] ? '#000000' : const.categories.sidewalk.color + }, + 'style:rightr': { + width: sidewalk_right ? 5 : 0, + offset: 2.5, + opacity: 0.3, + dashArray: '1,10', + lineCap: butt, + color: sidewalk_left in ['no', 'none'] ? '#000000' : const.categories.sidewalk.color + }, + }) }} + {% endif %} style: opacity: 0 fillOpacity: 0 From 9fff1f74e0c110f5dd8a4ae9ccc7ae4282f62c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sun, 16 Oct 2022 08:24:57 +0200 Subject: [PATCH 03/13] footway: include sidewalk=* in map info --- footways.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/footways.yaml b/footways.yaml index caf73e8..33ee293 100644 --- a/footways.yaml +++ b/footways.yaml @@ -272,6 +272,27 @@ info: | }) }} highway=cycleway segregated=yes + {% for k, d in const.sidewalks %} + + {{ markerLine({ + styles: d.styles, + 'style:leftr': { + width: 7, + offset: -2.5, + opacity: 0.3, + dashArray: '1,10', + lineCap: butt, + color: d.color + }, + 'style:left': { + width: 3, + offset: -7, + color: d.color + } + }) }} + {{ tagTrans('sidewalk', k) }} + + {% endfor %} const: categories: @@ -295,3 +316,13 @@ const: platform: key: railway color: '#00ff00' + sidewalks: + yes: + color: '#ff007f' + styles: 'leftr,left' + separate: + color: '#ff007f' + styles: 'leftr' + no: + color: '#000000' + styles: 'leftr,left' From 8fa3be8b581e0b78810c5bd68654758324250bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sat, 15 Oct 2022 11:39:03 +0200 Subject: [PATCH 04/13] footways: map info: shared/segregated cycle- and footway --- footways.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/footways.yaml b/footways.yaml index 33ee293..0878759 100644 --- a/footways.yaml +++ b/footways.yaml @@ -72,7 +72,11 @@ feature: {% if tags.footway %} {{ tagTrans('footway', tags.footway) }} {% elseif tags.highway %} - {{ tagTrans('highway', tags.highway) }} + {% if tags.segregated %} + {{ tagTrans('highway', tags.highway ~ ' segregated=' ~ tags.segregated) }} + {% else %} + {{ tagTrans('highway', tags.highway) }} + {% endif %} {% elseif tags.railway %} {{ tagTrans('railway', tags.railway) }} {% endif %} @@ -254,7 +258,7 @@ info: | dashOffset: 3 } }) }} - highway=cycleway segregated=no + {{ tagTrans('highway', 'cycleway segregated=no') }} {{ markerLine({ @@ -270,7 +274,7 @@ info: | offset: 1 } }) }} - highway=cycleway segregated=yes + {{ tagTrans('highway', 'cycleway segregated=yes') }} {% for k, d in const.sidewalks %} @@ -317,12 +321,12 @@ const: key: railway color: '#00ff00' sidewalks: - yes: + 'yes': color: '#ff007f' styles: 'leftr,left' - separate: + 'separate': color: '#ff007f' styles: 'leftr' - no: + 'no': color: '#000000' - styles: 'leftr,left' + styles: 'leftr' From 905f4b7b168b8f1411fd730604005d3c0ff2f49d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 17 Oct 2022 22:05:45 +0200 Subject: [PATCH 05/13] footways: improvements - highway=platform - sidewalk=no - improved label for sidewalk=* in map info --- footways.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/footways.yaml b/footways.yaml index 0878759..411f891 100644 --- a/footways.yaml +++ b/footways.yaml @@ -1,7 +1,7 @@ query: 15: | ( - way[highway~"^(footway|pedestrian|steps|path)$"]; + way[highway~"^(footway|pedestrian|steps|path|platform)$"]; way[highway=cycleway][foot~"^(yes|designated)$"]; way[footway]; way[sidewalk~"^(yes|both|left|right|no|none)$"]; @@ -21,7 +21,7 @@ feature: {% set category = 'sidewalk' %} {% endif %} - {% if tags.highway in ['pedestrian', 'footway','steps','path','cycleway'] %} + {% if tags.highway in ['pedestrian', 'footway','steps','path','cycleway','platform'] %} {% set sides = sides|merge(['main']) %} {% endif %} @@ -40,6 +40,12 @@ feature: {% set category = 'crossing' %} {% endif %} + {% if tags.sidewalk in ['no', 'none'] %} + {% set sidewalk_left = 'no' %} + {% set sidewalk_right = 'no' %} + {% set sides = sides|merge(['leftr', 'rightr']) %} + {% endif %} + {% if attribute(tags, 'sidewalk:both') %} {% set sidewalk_left = attribute(tags, 'sidewalk:both') %} {% set sides = sides|merge(['leftr', 'rightr']) %} @@ -281,8 +287,8 @@ info: | {{ markerLine({ styles: d.styles, 'style:leftr': { - width: 7, - offset: -2.5, + width: 9, + offset: -1, opacity: 0.3, dashArray: '1,10', lineCap: butt, From c5dd08339d987ee0e753740d80f393f2d05816e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 19 Oct 2022 16:25:05 +0200 Subject: [PATCH 06/13] kerbs/footways: english translation --- kerbs.yaml | 2 -- lang/en.json | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kerbs.yaml b/kerbs.yaml index e2d995f..980b63c 100644 --- a/kerbs.yaml +++ b/kerbs.yaml @@ -1,7 +1,5 @@ query: 14: (way[kerb];way[barrier=kerb];node[kerb];node[barrier=kerb];) -name: - en: Kerbs feature: pre: | {% set kerb = 'unknown' %} diff --git a/lang/en.json b/lang/en.json index 4cf78c5..99f651c 100644 --- a/lang/en.json +++ b/lang/en.json @@ -33,6 +33,7 @@ "category:energy": "Energy", "category:financial": "Financial", "category:fixme": "Fix Me", + "category:footways": "Footways", "category:gastro": "Gastronomy", "category:gastro-smoking": "Smokefree Gastronomy", "category:health": "Health", @@ -42,6 +43,7 @@ "category:index": "Index of Categories", "category:infrastructure": "Infrastructure", "category:internet": "Internet access", + "category:kerbs": "Kerbs", "category:law": "Law", "category:leisure": "Leisure", "category:leisure_sport_shopping": "Leisure, Sport and Shopping", From 7c2d7cd53a48b202d5f5349c18c5134f24d9aefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 20 Oct 2022 14:33:44 +0200 Subject: [PATCH 07/13] kerbs: remove wheelchair indication --- kerbs.yaml | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/kerbs.yaml b/kerbs.yaml index 980b63c..df047c6 100644 --- a/kerbs.yaml +++ b/kerbs.yaml @@ -7,11 +7,6 @@ feature: {% set kerb = tags.kerb %} {% endif %} - {% set wheelchair = 'unknown' %} - {% if const.wheelchair[tags.wheelchair] %} - {% set wheelchair = tags.wheelchair %} - {% endif %} - description: | {{ tagTrans('barrier', 'kerb') }} body: | @@ -66,8 +61,8 @@ feature: fill: true radius: 6 fillOpacity: 1 - width: 2 - color: | + width: 1 + color: black {{ const.wheelchair[wheelchair] }} info: | {{ tagTrans('barrier', 'kerb') }}: @@ -76,18 +71,7 @@ info: | {{ markerLine({ styles: 'default,marker', style: { width: 2, color: color }, 'style:marker': { width: 2, offset: 2, color: color, dashArray: '2,9'} } ) }} - {{ markerCircle({ radius: 4, width: 2, fillOpacity: 1, color: color }) }} - - {{ v == 'unknown' ? trans('unknown') : tagTrans('kerb', v) }} - - {% endfor %} - - {{ keyTrans('wheelchair') }}: - - {% for v, color in const.wheelchair %} - - From f88aaddfda13e0c942c3198e56e69f632f173d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 20 Oct 2022 19:40:23 +0200 Subject: [PATCH 08/13] kerbs: in body, always list all accompanying tags, even when they are empty --- kerbs.yaml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/kerbs.yaml b/kerbs.yaml index df047c6..f21b7d7 100644 --- a/kerbs.yaml +++ b/kerbs.yaml @@ -11,18 +11,10 @@ feature: {{ tagTrans('barrier', 'kerb') }} body: |
    - {% if tags.kerb %} -
  • {{ keyTrans('kerb') }}: {{ tagTrans('kerb', tags.kerb) }}
  • - {% endif %} - {% if tags.wheelchair %} -
  • {{ keyTrans('wheelchair') }}: {{ tagTrans('wheelchair', tags.wheelchair) }}
  • - {% endif %} - {% if tags.tactile_paving %} -
  • {{ keyTrans('tactile_paving') }}: {{ tagTrans('tactile_paving', tags.tactile_paving) }}
  • - {% endif %} - {% if tags.height %} -
  • {{ keyTrans('height') }}: {{ tags.height }}
  • - {% endif %} +
  • {{ keyTrans('kerb') }}: {{ tags.kerb ? tagTrans('kerb', tags.kerb) : trans('unknown') }}
  • +
  • {{ keyTrans('wheelchair') }}: {{ tags.wheelchair ? tagTrans('wheelchair', tags.wheelchair) : trans('unknown') }}
  • +
  • {{ keyTrans('tactile_paving') }}: {{ tags.tactile_paving ? tagTrans('tactile_paving', tags.tactile_paving) : trans('unknown') }}
  • +
  • {{ keyTrans('height') }}: {{ 'height' in tags ? tags.height : trans('unknown') }}
markerSymbol: listMarkerSymbol: | @@ -32,7 +24,7 @@ feature: {{ markerCircle({ radius: 5, width: 2, fillOpacity: 1, fillColor: const.kerb[kerb], color: const.wheelchair[wheelchair] }) }} {% endif %} details: | - {{ tags.kerb }} + {% if tags.kerb and tags.kerb != 'yes' %}{{ tagTrans('kerb', tags.kerb) }}{% endif %} {% if tags.height %}({{ tags.height }}){% endif %} styles: | {% if type == 'way' %} @@ -54,7 +46,7 @@ feature: offset: 2 width: 2 fill: false - dashArray: 2,9 + dashArray: '2,9' style:node: fillColor: | {{ const.kerb[kerb] }} From 2ff0a4e8edd4d857dc16faa477d556a236674cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 20 Oct 2022 22:15:17 +0200 Subject: [PATCH 09/13] footways: translation segregated path --- footways.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/footways.yaml b/footways.yaml index 411f891..3e9ce05 100644 --- a/footways.yaml +++ b/footways.yaml @@ -78,8 +78,8 @@ feature: {% if tags.footway %} {{ tagTrans('footway', tags.footway) }} {% elseif tags.highway %} - {% if tags.segregated %} - {{ tagTrans('highway', tags.highway ~ ' segregated=' ~ tags.segregated) }} + {% if tags.highway in ['path', 'cycleway'] and tags.segregated %} + {{ tagTrans('highway', 'cycleway segregated=' ~ tags.segregated) }} {% else %} {{ tagTrans('highway', tags.highway) }} {% endif %} From 35984d07eb91747894f348c5ec300b5531fa0bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 9 Dec 2022 12:02:00 +0100 Subject: [PATCH 10/13] footways: in body include info about infrastructure --- footways.yaml | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/footways.yaml b/footways.yaml index 3e9ce05..988ac19 100644 --- a/footways.yaml +++ b/footways.yaml @@ -86,6 +86,83 @@ feature: {% elseif tags.railway %} {{ tagTrans('railway', tags.railway) }} {% endif %} + body: | +
    + {% if 'main' in sides %} + {% if tags.width %}
  • + {{ keyTrans('width') }}: + {{ tags.width|formatUnit }} +
  • {% endif %} + {% if tags.wheelchair %}
  • + {{ keyTrans('wheelchair') }}: + {{ tagTrans('wheelchair', tags.wheelchair) }} +
  • {% endif %} + {% if tags.surface %}
  • + {{ keyTrans('surface') }}: + {{ tagTrans('surface', tags.surface) }} +
  • {% endif %} + {% if tags.tactile_paving %}
  • + {{ keyTrans('tactile_paving') }}: + {{ tagTrans('tactile_paving', tags.tactile_paving) }} +
  • {% endif %} + {% if tags.smoothness %}
  • + {{ keyTrans('smoothness') }}: + {{ tagTrans('smoothness', tags.smoothness) }} +
  • {% endif %} + {% endif %} + + {% if attribute(tags, 'sidewalk:left')|default(attribute(tags, 'sidewalk:both')) %} +
  • {{ keyTrans('sidewalk:left') }}:
      +
    • {{ tagTrans('sidewalk', attribute(tags, 'sidewalk:left')|default(attribute(tags, 'sidewalk:both'))) }}
    • + {% if attribute(tags, 'sidewalk:left:width')|default(attribute(tags, 'sidewalk:both:width')) %}
    • + {{ keyTrans('width') }}: + {{ attribute(tags, 'sidewalk:left:width')|default(attribute(tags, 'sidewalk:both:width'))|formatUnit }} +
    • {% endif %} + {% if attribute(tags, 'sidewalk:left:wheelchair')|default(attribute(tags, 'sidewalk:both:wheelchair')) %}
    • + {{ keyTrans('wheelchair') }}: + {{ tagTrans('wheelchair', attribute(tags, 'sidewalk:left:wheelchair')|default(attribute(tags, 'sidewalk:both:wheelchair'))) }} +
    • {% endif %} + {% if attribute(tags, 'sidewalk:left:surface')|default(attribute(tags, 'sidewalk:both:surface')) %}
    • + {{ keyTrans('surface') }}: + {{ tagTrans('surface', attribute(tags, 'sidewalk:left:surface')|default(attribute(tags, 'sidewalk:both:surface'))) }} +
    • {% endif %} + {% if attribute(tags, 'sidewalk:left:tactile_paving') %}
    • + {{ keyTrans('tactile_paving') }}: + {{ tagTrans('tactile_paving', attribute(tags, 'sidewalk:left:tactile_paving')|default(attribute(tags, 'sidewalk:both:tactile_paving'))) }} +
    • {% endif %} + {% if attribute(tags, 'sidewalk:left:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness')) %}
    • + {{ keyTrans('smoothness') }}: + {{ tagTrans('smoothness', attribute(tags, 'sidewalk:left:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness'))) }} +
    • {% endif %} +
  • + {% endif %} + + {% if attribute(tags, 'sidewalk:right')|default(attribute(tags, 'sidewalk:both')) %} +
  • {{ keyTrans('sidewalk:right') }}:
      +
    • {{ tagTrans('sidewalk', attribute(tags, 'sidewalk:right')|default(attribute(tags, 'sidewalk:both'))) }}
    • + {% if attribute(tags, 'sidewalk:right:width')|default(attribute(tags, 'sidewalk:both:width')) %}
    • + {{ keyTrans('width') }}: + {{ attribute(tags, 'sidewalk:right:width')|default(attribute(tags, 'sidewalk:both:width'))|formatUnit }} +
    • {% endif %} + {% if attribute(tags, 'sidewalk:right:wheelchair')|default(attribute(tags, 'sidewalk:both:wheelchair')) %}
    • + {{ keyTrans('wheelchair') }}: + {{ tagTrans('wheelchair', attribute(tags, 'sidewalk:right:wheelchair')|default(attribute(tags, 'sidewalk:both:wheelchair'))) }} +
    • {% endif %} + {% if attribute(tags, 'sidewalk:right:surface')|default(attribute(tags, 'sidewalk:both:surface')) %}
    • + {{ keyTrans('surface') }}: + {{ tagTrans('surface', attribute(tags, 'sidewalk:right:surface')|default(attribute(tags, 'sidewalk:both:surface'))) }} +
    • {% endif %} + {% if attribute(tags, 'sidewalk:right:tactile_paving') %}
    • + {{ keyTrans('tactile_paving') }}: + {{ tagTrans('tactile_paving', attribute(tags, 'sidewalk:right:tactile_paving')|default(attribute(tags, 'sidewalk:both:tactile_paving'))) }} +
    • {% endif %} + {% if attribute(tags, 'sidewalk:right:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness')) %}
    • + {{ keyTrans('smoothness') }}: + {{ tagTrans('smoothness', attribute(tags, 'sidewalk:right:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness'))) }} +
    • {% endif %} +
  • + {% endif %} +
markerSymbol: "" listMarkerSymbol: | {% if tags.area == 'yes' %} From 2925346b43039e178f3f4058f77e0d36ea31890a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 9 Dec 2022 12:22:15 +0100 Subject: [PATCH 11/13] footways: info about incline --- footways.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/footways.yaml b/footways.yaml index 988ac19..1d990e4 100644 --- a/footways.yaml +++ b/footways.yaml @@ -109,6 +109,10 @@ feature: {{ keyTrans('smoothness') }}: {{ tagTrans('smoothness', tags.smoothness) }} {% endif %} + {% if tags.incline %}
  • + {{ keyTrans('incline') }}: + {{ tags.incline|formatUnit('incline') }} +
  • {% endif %} {% endif %} {% if attribute(tags, 'sidewalk:left')|default(attribute(tags, 'sidewalk:both')) %} @@ -134,6 +138,10 @@ feature: {{ keyTrans('smoothness') }}: {{ tagTrans('smoothness', attribute(tags, 'sidewalk:left:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness'))) }} {% endif %} + {% if attribute(tags, 'sidewalk:left:incline')|default(attribute(tags, 'sidewalk:both:incline')) %}
  • + {{ keyTrans('incline') }}: + {{ attribute(tags, 'sidewalk:left:incline')|default(attribute(tags, 'sidewalk:both:incline'))|formatUnit('incline') }} +
  • {% endif %} {% endif %} @@ -160,6 +168,10 @@ feature: {{ keyTrans('smoothness') }}: {{ tagTrans('smoothness', attribute(tags, 'sidewalk:right:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness'))) }} {% endif %} + {% if attribute(tags, 'sidewalk:right:incline')|default(attribute(tags, 'sidewalk:both:incline')) %}
  • + {{ keyTrans('incline') }}: + {{ attribute(tags, 'sidewalk:right:incline')|default(attribute(tags, 'sidewalk:both:incline'))|formatUnit('incline') }} +
  • {% endif %} {% endif %} From 7d1afac35b7b05c9b10e51148f0cb5ec5a266bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 9 Dec 2022 20:57:18 +0100 Subject: [PATCH 12/13] footways: either tranlate incline or show value --- footways.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/footways.yaml b/footways.yaml index 1d990e4..c9f057f 100644 --- a/footways.yaml +++ b/footways.yaml @@ -109,9 +109,10 @@ feature: {{ keyTrans('smoothness') }}: {{ tagTrans('smoothness', tags.smoothness) }} {% endif %} - {% if tags.incline %}
  • + {% set v = tags.incline %} + {% if v %}
  • {{ keyTrans('incline') }}: - {{ tags.incline|formatUnit('incline') }} + {{ v in ['up', 'down', 'yes'] ? tagTrans('incline', v) : v }}
  • {% endif %} {% endif %} @@ -138,9 +139,10 @@ feature: {{ keyTrans('smoothness') }}: {{ tagTrans('smoothness', attribute(tags, 'sidewalk:left:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness'))) }} {% endif %} - {% if attribute(tags, 'sidewalk:left:incline')|default(attribute(tags, 'sidewalk:both:incline')) %}
  • + {% set v = attribute(tags, 'sidewalk:left:incline')|default(attribute(tags, 'sidewalk:both:incline'))|default(tags.incline) %} + {% if v %}
  • {{ keyTrans('incline') }}: - {{ attribute(tags, 'sidewalk:left:incline')|default(attribute(tags, 'sidewalk:both:incline'))|formatUnit('incline') }} + {{ v in ['up', 'down', 'yes'] ? tagTrans('incline', v) : v }}
  • {% endif %} {% endif %} @@ -168,9 +170,10 @@ feature: {{ keyTrans('smoothness') }}: {{ tagTrans('smoothness', attribute(tags, 'sidewalk:right:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness'))) }} {% endif %} - {% if attribute(tags, 'sidewalk:right:incline')|default(attribute(tags, 'sidewalk:both:incline')) %}
  • + {% set v = attribute(tags, 'sidewalk:right:incline')|default(attribute(tags, 'sidewalk:both:incline'))|default(tags.incline) %} + {% if i %}
  • {{ keyTrans('incline') }}: - {{ attribute(tags, 'sidewalk:right:incline')|default(attribute(tags, 'sidewalk:both:incline'))|formatUnit('incline') }} + {{ v in ['up', 'down', 'yes'] ? tagTrans('incline', v) : v }}
  • {% endif %} {% endif %} From 76a4a8db40bbcd836cbcb5d50bed77d91832d766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 9 Dec 2022 21:08:28 +0100 Subject: [PATCH 13/13] footways: Handle crossings --- footways.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/footways.yaml b/footways.yaml index c9f057f..0b39fda 100644 --- a/footways.yaml +++ b/footways.yaml @@ -88,7 +88,11 @@ feature: {% endif %} body: |
      - {% if 'main' in sides %} + {% if 'main' in sides or 'node' in sides %} + {% if tags.crossing %}
    • + {{ keyTrans('crossing') }}: + {{ tagTrans('crossing', tags.crossing) }} +
    • {% endif %} {% if tags.width %}
    • {{ keyTrans('width') }}: {{ tags.width|formatUnit }}
    - {{ markerCircle({ radius: 6, width: 2, fillOpacity: 1, fillColor: '#000000', color: color }) }} + {{ markerCircle({ radius: 4, width: 1, fillOpacity: 1, fillColor: color, color: 'black' }) }} {{ v == 'unknown' ? trans('unknown') : tagTrans('kerb', v) }}