Main categories of OpenStreetBrowser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
3.5 KiB

  1. type: overpass
  2. query:
  3. '12': |-
  4. (
  5. nwr[waterway~"^(dam|weir|waterfall|rapids|lock|lock_gate|sluice_gate)$"];
  6. nwr["seamark:restricted_area:restriction"~"no_entry|restricted_entry"];
  7. node["seamark:bridge:clearance_height"];
  8. )
  9. feature:
  10. pre: |-
  11. {% if tags.waterway %}
  12. {% set key = 'waterway' %}
  13. {% set value = tags.waterway %}
  14. {% elseif attribute(tags, 'seamark:restricted_area:restriction') %}
  15. {% set key = 'seamark:restricted_area:restriction' %}
  16. {% set value = '' %}
  17. {% elseif attribute(tags, 'seamark:bridge:clearance_height') %}
  18. {% set key = 'seamark:bridge:clearance_height' %}
  19. {% set value = attribute(tags, 'seamark:bridge:clearance_height') | round %}
  20. {% if value > 4 %}
  21. {% set value = 4 %}
  22. {% endif %}
  23. {% endif %}
  24. {% set constIndex = (key ~ "=" ~ value) %}
  25. {% set item = const[constIndex] %}
  26. title: |
  27. {{ item['sign'] | raw }} {{ localizedTag(tags, 'name') | default(localizedTag(tags, 'key')) | default(localizedTag(tags, 'ref')) }}
  28. description: |
  29. {% if key == 'seamark:restricted_area:restriction' %}
  30. {{ attribute(tags, 'seamark:restricted_area:restriction') }}
  31. {% elseif key == 'seamark:bridge:clearance_height' %}
  32. {{ attribute(tags, 'seamark:bridge:clearance_height') }} Meters
  33. {% else %}
  34. {{ tagTrans(key, value) }}
  35. {% endif %}
  36. body: |-
  37. <dl>
  38. <dt>{{ keyTrans('Description') }}</dt>
  39. <dd>{{ localizedTag(tags, 'description') }}</dd>
  40. {% if attribute(tags, 'operator') %}
  41. <dt>{{ keyTrans('Operator') }}</dt>
  42. <dd>{{ attribute(tags, 'operator') ? tagTrans('operator', attribute(tags, 'operator')) : '' }}</dd>
  43. {% endif %}
  44. <dt>{{ trans('Photos') }}</dt>
  45. <dd>
  46. <ul>
  47. {% if attribute(tags, 'mapillary') %}
  48. <li><a href="https://www.mapillary.com/app/?focus=photo&pKey={{ attribute(tags, 'mapillary') }}" rel="noreferrer" target="_blank">Mapillary</a></li>
  49. {% endif %}
  50. </ul>
  51. </dd>
  52. </dl>
  53. markerSign: <i class="fas fa-exclamation-triangle"></i>
  54. markerSymbol: |
  55. {{ markerPointer({ fillColor: '#ff6700' }) }}
  56. listMarkerSymbol: |
  57. {{ markerCircle({ fillColor: '#ff6700' }) }}
  58. priority: |-
  59. {% if const[constIndex] is defined %}
  60. {{ const[constIndex]['priority'] }}
  61. {% else %}
  62. 10
  63. {% endif %}
  64. const:
  65. waterway=dam:
  66. sign: <i class="fas fa-sort-amount-down-alt"></i>
  67. priority: 0
  68. waterway=weir:
  69. sign: <i class="fas fa-sort-amount-up-alt"></i>
  70. priority: 0
  71. waterway=waterfall:
  72. sign: <i class="far fa-chart-bar"></i>
  73. priority: 0
  74. waterway=rapids:
  75. sign: <i class="fas fa-water"></i>
  76. priority: 0
  77. waterway=lock:
  78. sign: <i class="fas fa-lock"></i>
  79. priority: 1
  80. waterway=lock_gate:
  81. sign: <i class="fas fa-torii-gate"></i>
  82. priority: 1
  83. waterway=sluice_gate:
  84. sign: <i class="fas fa-grip-lines"></i>
  85. priority: 0
  86. seamark:restricted_area:restriction=:
  87. sign: <i class='fa fa-times-rectangle-o'></i>
  88. priority: 1
  89. seamark:bridge:clearance_height=0:
  90. sign: <i class='fa fa-thermometer-0'></i>
  91. priority: 0
  92. seamark:bridge:clearance_height=1:
  93. sign: <i class='fa fa-thermometer-1'></i>
  94. priority: 0
  95. seamark:bridge:clearance_height=2:
  96. sign: <i class='fa fa-thermometer-2'></i>
  97. priority: 0
  98. seamark:bridge:clearance_height=3:
  99. sign: <i class='fa fa-thermometer-3'></i>
  100. priority: 0
  101. seamark:bridge:clearance_height=4:
  102. sign: <i class='fa fa-thermometer-4'></i>
  103. priority: 0