type: overpass
query:
'12': |-
(
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"];
)
feature:
pre: |-
{% if tags.waterway %}
{% set key = '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') %}
{% set key = 'seamark:bridge:clearance_height' %}
{% set value = attribute(tags, 'seamark:bridge:clearance_height') | round %}
{% if value > 4 %}
{% set value = 4 %}
{% endif %}
{% endif %}
{% set constIndex = (key ~ "=" ~ value) %}
{% set item = const[constIndex] %}
title: |
{{ item['sign'] | raw }} {{ localizedTag(tags, 'name') | default(localizedTag(tags, 'key')) | default(localizedTag(tags, 'ref')) }}
description: |
{% 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 %}
{{ tagTrans(key, value) }}
{% endif %}
body: |-
{% if attribute(tags, 'operator') %}
-
{{ keyTrans('Operator') }}:
{{ attribute(tags, 'operator') ? tagTrans('operator', attribute(tags, 'operator')) : '' }}
{% endif %}
{% if attribute(tags, 'height') %}
-
{{ keyTrans('Height') }}:
{{ attribute(tags, 'height') ? tagTrans('height', attribute(tags, 'height')) : '' }}
{% endif %}
{% if attribute(tags, 'width') %}
-
{{ keyTrans('Width') }}:
{{ attribute(tags, 'width') ? tagTrans('width', attribute(tags, 'width')) : '' }}
{% endif %}
{% if attribute(tags, 'mapillary') %}
-
{{ trans('Photos') }}:
Mapillary
{% endif %}
markerSign:
markerSymbol: |
{{ markerPointer({ fillColor: '#ff6700' }) }}
listMarkerSymbol: |
{{ markerCircle({ fillColor: '#ff6700' }) }}
priority: |-
{% if const[constIndex] is defined %}
{{ const[constIndex]['priority'] }}
{% else %}
10
{% endif %}
const:
waterway=dam:
sign:
priority: 0
waterway=weir:
sign:
priority: 0
waterway=waterfall:
sign:
priority: 0
waterway=rapids:
sign:
priority: 0
waterway=lock:
sign:
priority: 1
waterway=lock_gate:
sign:
priority: 1
waterway=sluice_gate:
sign:
priority: 0
seamark:restricted_area:restriction=:
sign:
priority: 1
seamark:bridge:clearance_height=0:
sign:
priority: 0
seamark:bridge:clearance_height=1:
sign:
priority: 0
seamark:bridge:clearance_height=2:
sign:
priority: 0
seamark:bridge:clearance_height=3:
sign:
priority: 0
seamark:bridge:clearance_height=4:
sign:
priority: 0