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.

121 lines
4.1 KiB

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