Main categories of OpenStreetBrowser with support for whitewater
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.

162 lines
5.6 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Gewässer",
  5. "en": "Waterbodies",
  6. "fr": "Hydrographie",
  7. "hu": "Vizek",
  8. "pt": "Massas de água",
  9. "pt-br": "Hidrografia"
  10. },
  11. "query": {
  12. "10": [
  13. "(",
  14. "way[waterway~\"^(river|canal)$\"];",
  15. "nwr[natural~\"^(divide|bay|strait)$\"];",
  16. "way[natural=water][water~\"^(lake|lagoon|reservoir|canal)$\"];",
  17. "relation[natural=water][type=multipolygon][water~\"^(lake|lagoon|reservoir|canal)$\"];",
  18. ")"
  19. ],
  20. "13": [
  21. "(",
  22. "nwr[natural~\"^(water|divide|bay|strait|spring|hot_spring|geyser)$\"];",
  23. "relation[type=multipolygon][natural=water];",
  24. "relation[type=multipolygon][waterway=riverbank];",
  25. "nwr[waterway];",
  26. ")"
  27. ]
  28. },
  29. "feature": {
  30. "pre": [
  31. "{% if tags.waterway %}",
  32. " {% set key = 'waterway' %}",
  33. " {% set value = tags.waterway %}",
  34. "{% elseif tags.water %}",
  35. " {% set key = 'water' %}",
  36. " {% set value = tags.water %}",
  37. "{% elseif tags.natural %}",
  38. " {% set key = 'natural' %}",
  39. " {% set value = tags.natural %}",
  40. "{% endif %}",
  41. "{% set kv = key ~ '=' ~ value %}"
  42. ],
  43. "description": [
  44. "{{ tagTrans(key, value) }}"
  45. ],
  46. "markerSign": [
  47. "{{ const[kv].sign|raw }}"
  48. ],
  49. "markerSymbol": [
  50. "{% if const[kv].symbol == 'pointer' %}",
  51. "{{ markerPointer({ fillColor: '#3388ff' })|raw }}",
  52. "{% endif %}"
  53. ],
  54. "listMarkerSymbol": [
  55. "{% if const[kv].symbol == 'pointer' %}",
  56. "{{ markerCircle({ fillColor: '#3388ff' })|raw }}",
  57. "{% elseif tags.natural == 'water' %}",
  58. "polygon",
  59. "{% else %}",
  60. "line",
  61. "{% endif %}"
  62. ],
  63. "priority": [
  64. "{% if tags.natural == 'divide' %}",
  65. "0",
  66. "{% elseif tags.natural == 'water' and tags.water in ['lake', 'lagoon', 'reservoir', 'canal'] %}",
  67. "0",
  68. "{% elseif tags.waterway == 'river' %}",
  69. "1",
  70. "{% elseif tags.waterway == 'stream' or tags.waterway == 'drain' %}",
  71. "3",
  72. "{% elseif tags.waterway == 'ditch' %}",
  73. "5",
  74. "{% else %}",
  75. "2",
  76. "{% endif %}"
  77. ],
  78. "style": {
  79. "width": [
  80. "{% if tags.waterway == 'river' %}",
  81. "4",
  82. "{% elseif tags.waterway == 'stream' or tags.waterway == 'drain' %}",
  83. "2",
  84. "{% elseif tags.waterway == 'ditch' %}",
  85. "1",
  86. "{% else %}",
  87. "3",
  88. "{% endif %}"
  89. ],
  90. "color": [
  91. "{% if tags.natural == 'divide' %}",
  92. "#ff0000",
  93. "{% elseif tags.waterway in [ 'dam', 'weir' ] %}",
  94. "#000000",
  95. "{% else %}",
  96. "#3388ff",
  97. "{% endif %}"
  98. ],
  99. "text": [
  100. "{% if type=='way' and tags.waterway in [ 'river', 'stream', 'canal', 'ditch', 'wadi', 'drystream', 'drain' ] %}",
  101. "{{ tags.name }} ➔ ",
  102. "{% endif %}"
  103. ],
  104. "textRepeat": "1"
  105. }
  106. },
  107. "const": {
  108. "natural=spring": {
  109. "sign": "<i class='fas fa-water'></i>",
  110. "symbol": "pointer"
  111. },
  112. "natural=hot_spring": {
  113. "sign": "<i style='color: orange;' class='fas fa-water'></i>",
  114. "symbol": "pointer"
  115. },
  116. "natural=geyser": {
  117. "sign": "<i style='color: red;' class='fas fa-water'></i>",
  118. "symbol": "pointer"
  119. },
  120. "waterway=waterfall": {
  121. "sign": "<img data-src='maki:waterfall'>",
  122. "symbol": "pointer"
  123. }
  124. },
  125. "info": [
  126. "<table>",
  127. " <tr>",
  128. " <td>{{ markerPolygon(evaluate({ \"natural\": \"water\" }))|raw }}</td>",
  129. " <td>{{ tagTrans('natural', 'water') }}</td>",
  130. " </tr>",
  131. " <tr>",
  132. " <td>{{ markerLine(evaluate({ \"waterway\": \"river\" }))|raw }}</td>",
  133. " <td>{{ tagTrans('waterway', 'river') }},",
  134. " {{ tagTrans('waterway', 'canal') }}</td>",
  135. " </tr>",
  136. "{% if map.zoom >= 13 %}",
  137. " <tr>",
  138. " <td>{{ markerLine(evaluate({ \"waterway\": \"stream\" }))|raw }}</td>",
  139. " <td>{{ tagTrans('waterway', 'stream') }}, {{ tagTrans('waterway', 'drain') }}</td>",
  140. " </tr>",
  141. " <tr>",
  142. " <td>{{ markerLine(evaluate({ \"waterway\": \"ditch\" }))|raw }}</td>",
  143. " <td>{{ tagTrans('waterway', 'ditch') }}</td>",
  144. " </tr>",
  145. " <tr>",
  146. " <td>{{ markerLine(evaluate({ \"waterway\": \"dam\" }))|raw }}</td>",
  147. " <td>{{ tagTrans('waterway', 'dam') }}, {{ tagTrans('waterway', 'weir') }}</td>",
  148. " </tr>",
  149. " {% for k, data in const %}",
  150. " <tr>",
  151. " <td>{{ markerCircle({ fillColor: '#3388ff' })|raw }}<div class='sign'>{{ data.sign|raw }}</div></td>",
  152. " <td>{{ tagTrans(k) }}</td>",
  153. " </tr>",
  154. " {% endfor %}",
  155. "{% endif %}",
  156. " <tr>",
  157. " <td>{{ markerLine(evaluate({ \"natural\": \"divide\" }))|raw }}</td>",
  158. " <td>{{ tagTrans('natural', 'divide') }}</td>",
  159. " </tr>",
  160. "</table>"
  161. ]
  162. }