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.

143 lines
5.4 KiB

  1. {
  2. "type": "overpass",
  3. "query": {
  4. "14": [
  5. "(",
  6. "way[highway=cycleway];",
  7. ")"
  8. ],
  9. "16": [
  10. "(",
  11. "way[highway][highway!~'^(motorway.*|trunk.*|footway|service|steps|platform|corridor|path)$'][bicycle!=no];",
  12. "way[highway~'^(cycleway|living_street)$'];",
  13. "way[bicycle~'^(yes|designated)$'];",
  14. "way[cycleway];",
  15. ")"
  16. ]
  17. },
  18. "feature": {
  19. "pre": [
  20. "{% set forward = false %}",
  21. "{% set backward = false %}",
  22. "{% set cycleway = tags.cycleway|split(';') %}",
  23. "{% set road_type = const[tags.highway] ? tags.highway : 'shared_lane' %}",
  24. "{% set oneway = attribute(tags, 'oneway:bicycle')|default(tags.oneway) %}",
  25. "{% if tags.highway == 'path' and tags.bicycle == 'designated' %}{% set road_type = 'cycleway' %}{% endif %}",
  26. "{% if oneway in ['yes', '1'] %}{% set forward = road_type %}{% elseif oneway in ['-1'] %}{% set backward = road_type %}{% else %}{% set forward = road_type %}{% set backward = road_type %}{% endif %}",
  27. "{% for c in cycleway %}",
  28. " {% if c in ['opposite', 'opposite_lane', 'opposite_track'] %}{% set backward = c|slice(9)|default(road_type) %}{% endif %}",
  29. " {% if const[c] %}{% if oneway in ['yes', '1', '-1'] %}{% set forward = c %}{% else %}{% set forward = c %}{% set backward = c %}{% endif %}{% endif %}",
  30. "{% endfor %}"
  31. ],
  32. "body": [
  33. "{{ keyTrans('highway') }}: {{ tagTrans('highway', tags.highway) }}<br>",
  34. "{% if tags.cycleway %}{{ keyTrans('cycleway') }}: {% for c in cycleway %}{{ tagTrans('cycleway', c) }} {% endfor %}<br>{% endif %}",
  35. "{% if tags.surface %}{{ keyTrans('surface') }}: {{ tagTrans('surface', tags.surface) }}<br>{% endif %}"
  36. ],
  37. "markerSymbol": null,
  38. "listMarkerSymbol": "line",
  39. "styles": "{% if forward and backward and forward == backward %}default{% else %}{% if forward %},forward{% endif %}{% if backward %},backward{% endif %}{% endif %}",
  40. "style": {
  41. "color": "{{ const[forward].color }}",
  42. "fill": "{% if tags.area == 'yes' %}true{% else %}false{% endif %}",
  43. "width": "{% if tags.area == 'yes' %}0{% else %}{{ const[forward].width }}{% endif %}"
  44. },
  45. "style:forward": {
  46. "width": "0",
  47. "fill": "false",
  48. "pattern": "arrowHead",
  49. "pattern-offset": "8",
  50. "pattern-repeat": "60",
  51. "pattern-polygon": "true",
  52. "pattern-pixelSize": "9",
  53. "pattern-angleCorrection": "0",
  54. "pattern-path-width": "0",
  55. "pattern-path-color": "{{ const[forward].color }}",
  56. "pattern-path-fillOpacity": "1",
  57. "pattern-lineOffset": "0",
  58. "pattern2": "dash",
  59. "pattern2-offset": "50",
  60. "pattern2-repeat": "60",
  61. "pattern2-pixelSize": "22",
  62. "pattern2-path-width": "{{ const[forward].width }}",
  63. "pattern2-path-color": "{{ const[forward].color }}",
  64. "pattern2-lineOffset": "0",
  65. "pattern2-path-lineCap": "butt",
  66. "pattern2-path-fillOpacity": "1"
  67. },
  68. "style:backward": {
  69. "width": "0",
  70. "fill": "false",
  71. "pattern": "arrowHead",
  72. "pattern-offset": "10",
  73. "pattern-repeat": "60",
  74. "pattern-polygon": "true",
  75. "pattern-pixelSize": "9",
  76. "pattern-angleCorrection": "180",
  77. "pattern-path-width": "0",
  78. "pattern-path-color": "{{ const[backward].color }}",
  79. "pattern-path-fillOpacity": "1",
  80. "pattern-lineOffset": "0",
  81. "pattern2": "dash",
  82. "pattern2-offset": "25",
  83. "pattern2-repeat": "60",
  84. "pattern2-pixelSize": "22",
  85. "pattern2-path-width": "{{ const[backward].width }}",
  86. "pattern2-path-color": "{{ const[backward].color }}",
  87. "pattern2-lineOffset": "0",
  88. "pattern2-path-lineCap": "butt",
  89. "pattern2-path-fillOpacity": "1"
  90. }
  91. },
  92. "info": [
  93. "<table>",
  94. "{% for key, value in const if not value.info_hide %}",
  95. " <tr>",
  96. " <td>{{ markerLine({'width': value.width, 'color': value.color})|raw }}</div></td>",
  97. " <td>{{ tagTrans(value.trans_tag|default('highway'), key) }}</td>",
  98. " </tr>",
  99. "{% endfor %}",
  100. "</table>"
  101. ],
  102. "const": {
  103. "cycleway": {
  104. "width": "3",
  105. "color": "#005f00"
  106. },
  107. "track": {
  108. "width": "3",
  109. "color": "#005f00",
  110. "info_hide": true
  111. },
  112. "lane": {
  113. "width": "3",
  114. "color": "#00af00"
  115. },
  116. "share_busway": {
  117. "width": "3",
  118. "color": "#5f0000",
  119. "trans_tag": "cycleway"
  120. },
  121. "footway": {
  122. "width": "3",
  123. "color": "#005faf"
  124. },
  125. "path": {
  126. "width": "3",
  127. "color": "#005faf",
  128. "info_hide": true
  129. },
  130. "pedestrian": {
  131. "width": "4",
  132. "color": "#00afaf"
  133. },
  134. "living_street": {
  135. "width": "4",
  136. "color": "#005f5f"
  137. },
  138. "shared_lane": {
  139. "width": "4",
  140. "color": "#000000"
  141. }
  142. }
  143. }