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.

122 lines
4.2 KiB

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. "pt": "Massas de água",
  8. "pt-br": "Hidrografia"
  9. },
  10. "query": {
  11. "10": [
  12. "(",
  13. "way[waterway~\"^(river|canal)$\"];",
  14. "way[natural~\"^(divide)$\"];",
  15. "way[natural=water][water~\"^(lake|lagoon|reservoir|canal)$\"];",
  16. "relation[natural=water][type=multipolygon][water~\"^(lake|lagoon|reservoir|canal)$\"];",
  17. ")"
  18. ],
  19. "13": [
  20. "(",
  21. "node[natural~\"^(water|divide)$\"];",
  22. "way[natural~\"^(water|divide)$\"];",
  23. "relation[type=multipolygon][natural=water];",
  24. "relation[type=multipolygon][waterway=riverbank];",
  25. "way[waterway];",
  26. ")"
  27. ]
  28. },
  29. "feature": {
  30. "description": [
  31. "{% if tags.waterway %}",
  32. "{{ tagTrans('waterway', tags.waterway) }}",
  33. "{% elseif tags.water %}",
  34. "{{ tagTrans('water', tags.water) }}",
  35. "{% elseif tags.natural %}",
  36. "{{ tagTrans('natural', tags.natural) }}",
  37. "{% endif %}"
  38. ],
  39. "markerSymbol": null,
  40. "listMarkerSymbol": [
  41. "{% if tags.natural == 'water' %}",
  42. "polygon",
  43. "{% else %}",
  44. "line",
  45. "{% endif %}"
  46. ],
  47. "priority": [
  48. "{% if tags.natural == 'divide' %}",
  49. "0",
  50. "{% elseif tags.natural == 'water' and tags.water in ['lake', 'lagoon', 'reservoir', 'canal'] %}",
  51. "0",
  52. "{% elseif tags.waterway == 'river' %}",
  53. "1",
  54. "{% elseif tags.waterway == 'stream' or tags.waterway == 'drain' %}",
  55. "3",
  56. "{% elseif tags.waterway == 'ditch' %}",
  57. "5",
  58. "{% else %}",
  59. "2",
  60. "{% endif %}"
  61. ],
  62. "style": {
  63. "width": [
  64. "{% if tags.waterway == 'river' %}",
  65. "4",
  66. "{% elseif tags.waterway == 'stream' or tags.waterway == 'drain' %}",
  67. "2",
  68. "{% elseif tags.waterway == 'ditch' %}",
  69. "1",
  70. "{% else %}",
  71. "3",
  72. "{% endif %}"
  73. ],
  74. "color": [
  75. "{% if tags.natural == 'divide' %}",
  76. "#ff0000",
  77. "{% elseif tags.waterway in [ 'dam', 'weir' ] %}",
  78. "#000000",
  79. "{% else %}",
  80. "#3388ff",
  81. "{% endif %}"
  82. ],
  83. "text": [
  84. "{% if type=='way' and tags.waterway in [ 'river', 'stream', 'canal', 'ditch', 'wadi', 'drystream', 'drain' ] %}",
  85. "{{ tags.name }} ➔ ",
  86. "{% endif %}"
  87. ],
  88. "textRepeat": "1"
  89. }
  90. },
  91. "info": [
  92. "<table>",
  93. " <tr>",
  94. " <td>{{ markerPolygon(evaluate({ \"natural\": \"water\" }))|raw }}</td>",
  95. " <td>{{ tagTrans('natural', 'water') }}</td>",
  96. " </tr>",
  97. " <tr>",
  98. " <td>{{ markerLine(evaluate({ \"waterway\": \"river\" }))|raw }}</td>",
  99. " <td>{{ tagTrans('waterway', 'river') }},",
  100. " {{ tagTrans('waterway', 'canal') }}</td>",
  101. " </tr>",
  102. "{% if map.zoom >= 13 %}",
  103. " <tr>",
  104. " <td>{{ markerLine(evaluate({ \"waterway\": \"stream\" }))|raw }}</td>",
  105. " <td>{{ tagTrans('waterway', 'stream') }}, {{ tagTrans('waterway', 'drain') }}</td>",
  106. " </tr>",
  107. " <tr>",
  108. " <td>{{ markerLine(evaluate({ \"waterway\": \"ditch\" }))|raw }}</td>",
  109. " <td>{{ tagTrans('waterway', 'ditch') }}</td>",
  110. " </tr>",
  111. " <tr>",
  112. " <td>{{ markerLine(evaluate({ \"waterway\": \"dam\" }))|raw }}</td>",
  113. " <td>{{ tagTrans('waterway', 'dam') }}, {{ tagTrans('waterway', 'weir') }}</td>",
  114. " </tr>",
  115. "{% endif %}",
  116. " <tr>",
  117. " <td>{{ markerLine(evaluate({ \"natural\": \"divide\" }))|raw }}</td>",
  118. " <td>{{ tagTrans('natural', 'divide') }}</td>",
  119. " </tr>",
  120. "</table>"
  121. ]
  122. }