-
Notifications
You must be signed in to change notification settings - Fork 11
/
paddling_hazards.yaml
133 lines (127 loc) · 4.31 KB
/
paddling_hazards.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name:
ca: Riscos de Rem
en: Paddling Hazards
fr: Risques en pagayage
it: Pericoli per la navigazione a remo
pl: Zagrożenia związane z wiosłowaniem
pt-br: Riscos
tr: Kürek Tehlikeleri
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: |-
<ul>
{% if attribute(tags, 'operator') %}
<li class='hasSymbol'>
<i class='fa fa-drivers-license-o'></i>
{{ keyTrans('Operator') }}:
<span class='value'>{{ attribute(tags, 'operator') ? tagTrans('operator', attribute(tags, 'operator')) : '' }}</span>
</li>
{% endif %}
{% if attribute(tags, 'height') %}
<li class='hasSymbol'>
<i class='fa-solid fa-ruler-vertical'></i>
{{ keyTrans('Height') }}:
<span class='value'>{{ attribute(tags, 'height') ? tagTrans('height', attribute(tags, 'height')) : '' }}</span>
</li>
{% endif %}
{% if attribute(tags, 'width') %}
<li class='hasSymbol'>
<i class='fas fa-ruler-horizontal'></i>
{{ keyTrans('Width') }}:
<span class='value'>{{ attribute(tags, 'width') ? tagTrans('width', attribute(tags, 'width')) : '' }}</span>
</li>
{% endif %}
{% if attribute(tags, 'mapillary') %}
<li class='hasSymbol'>
<i class='fa fa-camera'></i>
{{ trans('Photos') }}:
<span class='value'>
<a href="https://www.mapillary.com/app/?focus=photo&pKey={{ attribute(tags, 'mapillary') }}" rel="noreferrer" target="_blank">Mapillary</a>
</span>
</li>
{% endif %}
</ul>
markerSign: <i class="fas fa-exclamation-triangle"></i>
markerSymbol: |
{{ markerPointer({ fillColor: '#ff6700' }) }}
listMarkerSymbol: |
{{ markerCircle({ fillColor: '#ff6700' }) }}
priority: |-
{% if const[constIndex] is defined %}
{{ const[constIndex]['priority'] }}
{% else %}
10
{% endif %}
const:
waterway=dam:
sign: <i class="fas fa-sort-amount-down-alt"></i>
priority: 0
waterway=weir:
sign: <i class="fas fa-sort-amount-up-alt"></i>
priority: 0
waterway=waterfall:
sign: <i class="far fa-chart-bar"></i>
priority: 0
waterway=rapids:
sign: <i class="fas fa-water"></i>
priority: 0
waterway=lock:
sign: <i class="fas fa-lock"></i>
priority: 1
waterway=lock_gate:
sign: <i class="fas fa-torii-gate"></i>
priority: 1
waterway=sluice_gate:
sign: <i class="fas fa-grip-lines"></i>
priority: 0
seamark:restricted_area:restriction=:
sign: <i class='fa fa-times-rectangle-o'></i>
priority: 1
seamark:bridge:clearance_height=0:
sign: <i class='fa fa-thermometer-0'></i>
priority: 0
seamark:bridge:clearance_height=1:
sign: <i class='fa fa-thermometer-1'></i>
priority: 0
seamark:bridge:clearance_height=2:
sign: <i class='fa fa-thermometer-2'></i>
priority: 0
seamark:bridge:clearance_height=3:
sign: <i class='fa fa-thermometer-3'></i>
priority: 0
seamark:bridge:clearance_height=4:
sign: <i class='fa fa-thermometer-4'></i>
priority: 0