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.

125 lines
4.1 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. <ul>
  38. {% if attribute(tags, 'operator') %}
  39. <li class='hasSymbol'>
  40. <i class='fa fa-drivers-license-o'></i>
  41. {{ keyTrans('Operator') }}:
  42. <span class='value'>{{ attribute(tags, 'operator') ? tagTrans('operator', attribute(tags, 'operator')) : '' }}</span>
  43. </li>
  44. {% endif %}
  45. {% if attribute(tags, 'height') %}
  46. <li class='hasSymbol'>
  47. <i class='fa-solid fa-ruler-vertical'></i>
  48. {{ keyTrans('Height') }}:
  49. <span class='value'>{{ attribute(tags, 'height') ? tagTrans('height', attribute(tags, 'height')) : '' }}</span>
  50. </li>
  51. {% endif %}
  52. {% if attribute(tags, 'width') %}
  53. <li class='hasSymbol'>
  54. <i class='fas fa-ruler-horizontal'></i>
  55. {{ keyTrans('Width') }}:
  56. <span class='value'>{{ attribute(tags, 'width') ? tagTrans('width', attribute(tags, 'width')) : '' }}</span>
  57. </li>
  58. {% endif %}
  59. {% if attribute(tags, 'mapillary') %}
  60. <li class='hasSymbol'>
  61. <i class='fa fa-camera'></i>
  62. {{ trans('Photos') }}:
  63. <span class='value'>
  64. <a href="https://www.mapillary.com/app/?focus=photo&pKey={{ attribute(tags, 'mapillary') }}" rel="noreferrer" target="_blank">Mapillary</a>
  65. </span>
  66. </li>
  67. {% endif %}
  68. </ul>
  69. markerSign: <i class="fas fa-exclamation-triangle"></i>
  70. markerSymbol: |
  71. {{ markerPointer({ fillColor: '#ff6700' }) }}
  72. listMarkerSymbol: |
  73. {{ markerCircle({ fillColor: '#ff6700' }) }}
  74. priority: |-
  75. {% if const[constIndex] is defined %}
  76. {{ const[constIndex]['priority'] }}
  77. {% else %}
  78. 10
  79. {% endif %}
  80. const:
  81. waterway=dam:
  82. sign: <i class="fas fa-sort-amount-down-alt"></i>
  83. priority: 0
  84. waterway=weir:
  85. sign: <i class="fas fa-sort-amount-up-alt"></i>
  86. priority: 0
  87. waterway=waterfall:
  88. sign: <i class="far fa-chart-bar"></i>
  89. priority: 0
  90. waterway=rapids:
  91. sign: <i class="fas fa-water"></i>
  92. priority: 0
  93. waterway=lock:
  94. sign: <i class="fas fa-lock"></i>
  95. priority: 1
  96. waterway=lock_gate:
  97. sign: <i class="fas fa-torii-gate"></i>
  98. priority: 1
  99. waterway=sluice_gate:
  100. sign: <i class="fas fa-grip-lines"></i>
  101. priority: 0
  102. seamark:restricted_area:restriction=:
  103. sign: <i class='fa fa-times-rectangle-o'></i>
  104. priority: 1
  105. seamark:bridge:clearance_height=0:
  106. sign: <i class='fa fa-thermometer-0'></i>
  107. priority: 0
  108. seamark:bridge:clearance_height=1:
  109. sign: <i class='fa fa-thermometer-1'></i>
  110. priority: 0
  111. seamark:bridge:clearance_height=2:
  112. sign: <i class='fa fa-thermometer-2'></i>
  113. priority: 0
  114. seamark:bridge:clearance_height=3:
  115. sign: <i class='fa fa-thermometer-3'></i>
  116. priority: 0
  117. seamark:bridge:clearance_height=4:
  118. sign: <i class='fa fa-thermometer-4'></i>
  119. priority: 0