diff --git a/paddling.yaml b/paddling.yaml new file mode 100644 index 0000000..27db952 --- /dev/null +++ b/paddling.yaml @@ -0,0 +1,5 @@ +type: index +subCategories: + - id: paddling_amenities + - id: paddling_hazards + - id: paddling_routes diff --git a/paddling_amenities.yaml b/paddling_amenities.yaml new file mode 100644 index 0000000..021bc92 --- /dev/null +++ b/paddling_amenities.yaml @@ -0,0 +1,106 @@ +type: overpass +name: + en: Paddling Amenities +query: + '14': |- + ( + node["canoe"="put_in"]; + node["leisure"="slipway"]; + way["canoe"="portage"]; + nwr[shop~"^(boat)$"]["boat:type"~"^(.*;|)canoe|kayak|standup_paddleboard|dinghy|pedalboat(|;.*)$"]; + nwr[rental~"^(boat)$"]["boat:type"~"^(.*;|)canoe|kayak|standup_paddleboard|dinghy|pedalboat(|;.*)$"]; + nwr["canoe_rental"="yes"]; + nwr["kayak_rental"="yes"]; + nwr["standup_paddleboard_rental"="yes"]; + nwr["dinghy_rental"="yes"]; + nwr["pedalboat_rental"="yes"]; + ) +feature: + pre: |- + {% if tags.canoe == 'portage' and ( not attribute(tags, 'surface') or attribute(tags, 'surface') == 'water' ) %} + {% set key = 'waterway' %} + {% set value = 'portage' %} + {% elseif 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 = 'shop' %} + {% elseif tags.rental or tags.canoe_rental or tags.kayak_rental or tags.standup_paddleboard_rental or tags.dingy_rental or tags.pedalboat_rental %} + {% set key = 'shop' %} + {% set value = 'rental' %} + {% endif %} + + {% set constIndex = (key ~ "=" ~ value) %} + {% set item = const[constIndex] %} + title: | + {{ localizedTag(tags, 'name') }} + {% if attribute(tags, 'ref') %} + ( {{ localizedTag(tags, 'ref') }} ) + {% endif %} + description: | + {{ tagTrans(key, value) }} + body: |- + {% if constIndex in ['canoe=put_in', 'leisure=slipway','canoe=portage'] %} +
{{ markerLine({ 'width': 4, color: data.color })|raw }} | +{% if value %}{{ tagTrans('network', value) }}{% else %}{{ trans('unknown') }}{% endif %} | +