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.

148 lines
5.6 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. "{% if tags.bicycle_road and tags.bicycle_road != 'no' %}{% set road_type = 'bicycle_road' %}{% endif %}",
  25. "{% set oneway = attribute(tags, 'oneway:bicycle')|default(tags.oneway) %}",
  26. "{% if tags.highway == 'path' and tags.bicycle == 'designated' %}{% set road_type = 'cycleway' %}{% endif %}",
  27. "{% 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 %}",
  28. "{% for c in cycleway %}",
  29. " {% if c in ['opposite', 'opposite_lane', 'opposite_track'] %}{% set backward = c|slice(9)|default(road_type) %}{% endif %}",
  30. " {% if const[c] %}{% if oneway in ['yes', '1', '-1'] %}{% set forward = c %}{% else %}{% set forward = c %}{% set backward = c %}{% endif %}{% endif %}",
  31. "{% endfor %}"
  32. ],
  33. "body": [
  34. "{{ keyTrans('highway') }}: {{ tagTrans('highway', tags.highway) }}<br>",
  35. "{% if tags.cycleway %}{{ keyTrans('cycleway') }}: {% for c in cycleway %}{{ tagTrans('cycleway', c) }} {% endfor %}<br>{% endif %}",
  36. "{% if tags.surface %}{{ keyTrans('surface') }}: {{ tagTrans('surface', tags.surface) }}<br>{% endif %}"
  37. ],
  38. "markerSymbol": null,
  39. "listMarkerSymbol": "line",
  40. "styles": "{% if forward and backward and forward == backward %}default{% else %}{% if forward %},forward{% endif %}{% if backward %},backward{% endif %}{% endif %}",
  41. "style": {
  42. "color": "{{ const[forward].color }}",
  43. "fill": "{% if tags.area == 'yes' %}true{% else %}false{% endif %}",
  44. "width": "{% if tags.area == 'yes' %}0{% else %}{{ const[forward].width }}{% endif %}"
  45. },
  46. "style:forward": {
  47. "width": "0",
  48. "fill": "false",
  49. "pattern": "arrowHead",
  50. "pattern-offset": "8",
  51. "pattern-repeat": "60",
  52. "pattern-polygon": "true",
  53. "pattern-pixelSize": "9",
  54. "pattern-angleCorrection": "0",
  55. "pattern-path-width": "0",
  56. "pattern-path-color": "{{ const[forward].color }}",
  57. "pattern-path-fillOpacity": "1",
  58. "pattern-lineOffset": "0",
  59. "pattern2": "dash",
  60. "pattern2-offset": "50",
  61. "pattern2-repeat": "60",
  62. "pattern2-pixelSize": "22",
  63. "pattern2-path-width": "{{ const[forward].width }}",
  64. "pattern2-path-color": "{{ const[forward].color }}",
  65. "pattern2-lineOffset": "0",
  66. "pattern2-path-lineCap": "butt",
  67. "pattern2-path-fillOpacity": "1"
  68. },
  69. "style:backward": {
  70. "width": "0",
  71. "fill": "false",
  72. "pattern": "arrowHead",
  73. "pattern-offset": "10",
  74. "pattern-repeat": "60",
  75. "pattern-polygon": "true",
  76. "pattern-pixelSize": "9",
  77. "pattern-angleCorrection": "180",
  78. "pattern-path-width": "0",
  79. "pattern-path-color": "{{ const[backward].color }}",
  80. "pattern-path-fillOpacity": "1",
  81. "pattern-lineOffset": "0",
  82. "pattern2": "dash",
  83. "pattern2-offset": "25",
  84. "pattern2-repeat": "60",
  85. "pattern2-pixelSize": "22",
  86. "pattern2-path-width": "{{ const[backward].width }}",
  87. "pattern2-path-color": "{{ const[backward].color }}",
  88. "pattern2-lineOffset": "0",
  89. "pattern2-path-lineCap": "butt",
  90. "pattern2-path-fillOpacity": "1"
  91. }
  92. },
  93. "info": [
  94. "<table>",
  95. "{% for key, value in const if not value.info_hide %}",
  96. " <tr>",
  97. " <td>{{ markerLine({'width': value.width, 'color': value.color})|raw }}</div></td>",
  98. " <td>{{ tagTrans(value.trans_tag|default('highway'), key) }}</td>",
  99. " </tr>",
  100. "{% endfor %}",
  101. "</table>"
  102. ],
  103. "const": {
  104. "cycleway": {
  105. "width": "2",
  106. "color": "#0000ff"
  107. },
  108. "track": {
  109. "width": "4",
  110. "color": "#0000ff",
  111. "info_hide": true
  112. },
  113. "lane": {
  114. "width": "2",
  115. "color": "#7f0000"
  116. },
  117. "share_busway": {
  118. "width": "2",
  119. "color": "#7f007f",
  120. "trans_tag": "cycleway"
  121. },
  122. "footway": {
  123. "width": "2",
  124. "color": "#00af00"
  125. },
  126. "path": {
  127. "width": "2",
  128. "color": "#00af00",
  129. "info_hide": true
  130. },
  131. "pedestrian": {
  132. "width": "4",
  133. "color": "#5faf00"
  134. },
  135. "living_street": {
  136. "width": "4",
  137. "color": "#00afff"
  138. },
  139. "bicycle_road": {
  140. "width": "4",
  141. "color": "#003fff"
  142. },
  143. "shared_lane": {
  144. "width": "4",
  145. "color": "#000000"
  146. }
  147. }
  148. }