diff --git a/paddlecraft.yaml b/paddlecraft.yaml deleted file mode 100644 index fe28614..0000000 --- a/paddlecraft.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: overpass -name: - en: Paddlecraft -query: - '6': relation[type=route][route~"^(|.*;)canoe(|;.*)$"][network~'^(|.*;)(ipn)(|;.*)$'] - '7': relation[type=route][route~"^(|.*;)canoe(|;.*)$"][network~'^(|.*;)(ipn|npn)(|;.*)$'] - '8': relation[type=route][route~"^(|.*;)canoe(|;.*)$"][network~'^(|.*;)(ipn|npn|rpn)(|;.*)$'] - '9': (relation[type=route][route~"^(|.*;)canoe(|;.*)$"];node["canoe"="put_in"];node["leisure"="slipway"];way["canoe"="portage"];) -feature: - body: |- -
-
Surface
-
{% if attribute(tags, 'surface') %}{{ tagTrans('surface', tags.surface) }}{% endif %}
-
Description
-
{{ tags.description }}
-
- {% if attribute(tags, 'mapillary') %} -
Mapillary Photo
- {% endif %} - markerSign: |- - {% if tags.canoe == 'put_in' %} - πŸ›Ά - {% elseif tags.leisure == 'slipway' %} - 🚣🏻 - {% endif %} - diff --git a/paddling.yaml b/paddling.yaml new file mode 100644 index 0000000..a240c3f --- /dev/null +++ b/paddling.yaml @@ -0,0 +1,4 @@ +type: index +subCategories: + - id: paddling_amenities + - id: paddling_routes diff --git a/paddling_amenities.yaml b/paddling_amenities.yaml new file mode 100644 index 0000000..29c4e53 --- /dev/null +++ b/paddling_amenities.yaml @@ -0,0 +1,65 @@ +type: overpass +name: + en: Paddling Amenities +query: + '12': |- + ( + node["canoe"="put_in"]; + node["leisure"="slipway"]; + way["canoe"="portage"]; + nwr[shop~"^(boat)$"]["boat:type"~"^(.*;|)canoe|kayak|sup(|;.*)$"]; + ) +feature: + pre: |- + {% if tags.canoe %} + {% set key = 'canoe' %} + {% set value = tags.canoe %} + {% elseif tags.leisure %} + {% set key = 'leisure' %} + {% set value = tags.leisure %} + {% elseif tags.shop %} + {% set key = 'shop' %} + {% set value = tags.shop %} + {% endif %} + + {% set constIndex = (key ~ "=" ~ value) %} + {% set amenity = const[constIndex] %} + + title: | + {{ localizedTag(tags, 'name') | default(localizedTag(tags, 'operator')) | default(localizedTag(tags, 'ref')) }} + description: | + {{ tagTrans(key, value) }} + body: |- + {% if constIndex in ['canoe=put_in', 'leisure=slipway','canoe=portage'] %} +
+
Surface
+
{% if attribute(tags, 'surface') %}{{ tagTrans('surface', tags.surface) }}{% endif %}
+
Description
+
{{ tags.description }}
+
+ {% if attribute(tags, 'mapillary') %} +
Mapillary Photo
+ {% endif %} + {% endif %} + markerSign: '{{ const[constIndex][''sign''] }}' + + priority: |- + {% if const[constIndex] is defined %} + {{ const[constIndex]['priority'] }} + {% else %} + 10 + {% endif %} + +const: + canoe=put_in: + sign: πŸ›Ά + priority: 0 + leisure=slipway: + sign: 🚣🏻 + priority: 1 + canoe=portage: + sign: 🚢🏻 + priority: 2 + shop=boat: + sign: πŸ›’ + priority: 3 diff --git a/paddling_routes.yaml b/paddling_routes.yaml new file mode 100644 index 0000000..82e10f4 --- /dev/null +++ b/paddling_routes.yaml @@ -0,0 +1,101 @@ +type: overpass +name: + en: Paddling Routes +query: + '6': relation[type=route][route~"^(|.*;)canoe(|;.*)$"][network~'^(|.*;)(ipn)(|;.*)$'] + '7': relation[type=route][route~"^(|.*;)canoe(|;.*)$"][network~'^(|.*;)(ipn|npn)(|;.*)$'] + '8': relation[type=route][route~"^(|.*;)canoe(|;.*)$"][network~'^(|.*;)(ipn|npn|rpn)(|;.*)$'] + '10': (relation[type=route][route~"^(|.*;)canoe(|;.*)$"] +members: true +feature: + pre: |- + {% set network = tags.network %} + {% for n in tags.network|split(';') %} + {% if n|matches('pn$') %}{% set network = n %}{% endif %} + {% endfor %} + priority: '{{ const[network].priority|default(4) }}' + description: '{% if network %}{{ tagTrans(''network'', network) }}{% endif %}' + listMarkerSymbol: '{{ markerLine({ ''width'': 4, ''color'': const[network|default('''')].color|default(const[''''].color) })|raw }}' + title: '{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}' + styles: '' + markerSymbol: '' +memberFeature: + pre: |- + {% set priority = 4 %} + {% set network = '' %} + {% set refs = [] %} + + {% for master in masters %} + {% set masterNetwork = '' %} + {% for n in master.tags.network|split(';') %} + {% if n|matches('pn$') %}{% set masterNetwork = n %}{% endif %} + {% endfor %} + {% set _p = const[masterNetwork].priority|default(4) %} + {% if _p < priority %} + {% set priority = _p %} + {% set network = masterNetwork %} + {% endif %} + {% if master.tags.ref %} + {% set refs = refs|merge([ master.tags.ref ]) %} + {% endif %} + {% endfor %} + body: |- +

Routes

+ + listExclude: '1' + style: + color: '{{ const[network].color }}' + width: 4 + opacity: 1 + text: '{{ refs|join('' Β· '') }} ' + textRepeat: '1' + textOffset: '12' + textFontWeight: bold +const: + ipn: + color: '#ff0000' + priority: 0 + zoom: 10 + npn: + color: '#ff00ba' + priority: 1 + zoom: 11 + rpn: + color: '#ba00ff' + priority: 2 + zoom: 12 + lpn: + color: '#0000ff' + priority: 3 + zoom: 14 + '': + color: '#007fff' + priority: 4 + zoom: 14 +info: |- + + {% for value, data in const %} + {% if data.zoom <= map.zoom %} + + + + + {% endif %} + {% endfor %} +
{{ markerLine({ 'width': 4, color: data.color })|raw }}{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %}