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.

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