Browse Source

Added seamark:restricted_area:restriction to hazards.

master
Nathan Hartley 2 years ago
parent
commit
bb9690eaf1
  1. 13
      paddling_hazards.yaml

13
paddling_hazards.yaml

@ -3,6 +3,7 @@ query:
'12': |- '12': |-
( (
nwr[waterway~"^(dam|weir|waterfall|rapids|lock|lock_gate|sluice_gate)$"]; nwr[waterway~"^(dam|weir|waterfall|rapids|lock|lock_gate|sluice_gate)$"];
nwr["seamark:restricted_area:restriction"~"no_entry|restricted_entry"];
node["seamark:bridge:clearance_height"]; node["seamark:bridge:clearance_height"];
) )
feature: feature:
@ -10,6 +11,9 @@ feature:
{% if tags.waterway %} {% if tags.waterway %}
{% set key = 'waterway' %} {% set key = 'waterway' %}
{% set value = tags.waterway %} {% set value = tags.waterway %}
{% elseif attribute(tags, 'seamark:restricted_area:restriction') %}
{% set key = 'seamark:restricted_area:restriction' %}
{% set value = '' %}
{% elseif attribute(tags, 'seamark:bridge:clearance_height') %} {% elseif attribute(tags, 'seamark:bridge:clearance_height') %}
{% set key = 'seamark:bridge:clearance_height' %} {% set key = 'seamark:bridge:clearance_height' %}
{% set value = Math.trunc(attribute(tags, 'seamark:bridge:clearance_height')) %} {% set value = Math.trunc(attribute(tags, 'seamark:bridge:clearance_height')) %}
@ -23,8 +27,10 @@ feature:
title: | title: |
{{ item['sign'] | raw }} {{ localizedTag(tags, 'name') | default(localizedTag(tags, 'key')) | default(localizedTag(tags, 'ref')) }} {{ item['sign'] | raw }} {{ localizedTag(tags, 'name') | default(localizedTag(tags, 'key')) | default(localizedTag(tags, 'ref')) }}
description: | description: |
{% if key == 'seamark:bridge:clearance_height' %}
{{ value }} Meters
{% if key == 'seamark:restricted_area:restriction' %}
{{ attribute(tags, 'seamark:restricted_area:restriction') }}
{% elseif key == 'seamark:bridge:clearance_height' %}
{{ attribute(tags, 'seamark:bridge:clearance_height') }} Meters
{% else %} {% else %}
{{ tagTrans(key, value) }} {{ tagTrans(key, value) }}
{% endif %} {% endif %}
@ -81,6 +87,9 @@ const:
waterway=sluice_gate: waterway=sluice_gate:
sign: <i class="fas fa-grip-lines"></i> sign: <i class="fas fa-grip-lines"></i>
priority: 0 priority: 0
seamark:restricted_area:restriction=:
sign: <i class='fa fa-times-rectangle-o'></i>
priority: 1
seamark:bridge:clearance_height=0: seamark:bridge:clearance_height=0:
sign: <i class='fa fa-thermometer-0'></i> sign: <i class='fa fa-thermometer-0'></i>
priority: 0 priority: 0

Loading…
Cancel
Save