Main categories of OpenStreetBrowser with public transport zoom level
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.

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