A repository for testing purposes.
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.

139 lines
5.8 KiB

  1. {
  2. "type": "overpass",
  3. "name": {
  4. "de": "Radwegrichtungen",
  5. "en": "Cycleway Directions"
  6. },
  7. "query": {
  8. "14": [
  9. "(",
  10. "way[highway=cycleway];",
  11. "way[cycleway];",
  12. "way[\"cycleway:left\"];",
  13. "way[\"cycleway:right\"];",
  14. "way[oneway];",
  15. ")"
  16. ]
  17. },
  18. "feature": {
  19. "pre": [
  20. "{% set oneway = 0 %}",
  21. "{% if tags.oneway in [ 'yes', '1' ] %}{% set oneway = 1 %}",
  22. "{% elseif tags.oneway in [ '-1' ] %}{% set oneway = -1 %}",
  23. "{% endif %}",
  24. "",
  25. "{% set driving_side = 'right' %}"
  26. ],
  27. "markerSymbol": null,
  28. "listMarkerSymbol": "line",
  29. "styles": "default,left,right",
  30. "style": {
  31. "width": [
  32. "{% if tags.highway == 'cycleway' %}",
  33. "3",
  34. "{% else %}",
  35. "7",
  36. "{% endif %}"
  37. ],
  38. "color": [
  39. "{% if tags.highway == 'cycleway' %}",
  40. "#007f00",
  41. "{% else %}",
  42. "#ffffff7f",
  43. "{% endif %}"
  44. ],
  45. "text": [
  46. "{% if tags.highway == 'cycleway' and oneway == 1 %}",
  47. "🡪 ",
  48. "{% elseif tags.highway == 'cycleway' and oneway == -1 %}",
  49. "🡨 ",
  50. "{% elseif oneway == 1 and tags.cycleway in [ 'opposite' ] %}",
  51. "🡨🡺 ",
  52. "{% elseif oneway == 1 and not tags.cycleway and not attribute(tags, 'cycleway:left') and not attribute(tags, 'cycleway:right') and attribute(tags, 'oneway:bicycle') == 'no' %}",
  53. "🡨🡺 ",
  54. "{% elseif oneway == -1 and tags.cycleway in [ 'opposite' ] %}",
  55. "🡸🡪 ",
  56. "{% elseif oneway == 1 and not tags.cycleway and not attribute(tags, 'cycleway:left') and not attribute(tags, 'cycleway:right') and attribute(tags, 'oneway:bicycle') == 'no' %}",
  57. "🡸🡪 ",
  58. "{% elseif oneway == 1 %}",
  59. "🡺 ",
  60. "{% elseif oneway == -1 %}",
  61. "🡸 ",
  62. "{% endif %}",
  63. ""
  64. ],
  65. "textRepeat": "1"
  66. },
  67. "style:highlight": null,
  68. "style:left": {
  69. "color": [
  70. "{% if tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_lane' ] %}",
  71. "#00ff00",
  72. "{% elseif tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_track' ] %}",
  73. "#00af00",
  74. "{% endif %}"
  75. ],
  76. "offset": "-3",
  77. "text": [
  78. "{% if attribute(tags, 'cycleway:left') in [ 'lane', 'shared_lane', 'track' ] %}",
  79. "🡪 ",
  80. "{% elseif attribute(tags, 'cycleway:left') in [ 'opposite_lane', 'opposite_track' ] %}",
  81. "🡨 ",
  82. "{% elseif driving_side == 'right' and oneway <= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}",
  83. "🡪 ",
  84. "{% elseif driving_side == 'left' and oneway >= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}",
  85. "🡨 ",
  86. "{% elseif driving_side == 'right' and oneway <= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}",
  87. "🡨 ",
  88. "{% elseif driving_side == 'left' and oneway >= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}",
  89. "🡪 ",
  90. "{% endif %}"
  91. ],
  92. "textRepeat": "1",
  93. "textOffset": "0"
  94. },
  95. "style:right": {
  96. "color": [
  97. "{% if tags.cycleway in [ 'lane' ] or attribute(tags, 'cycleway:right') in [ 'lane', 'opposite_lane' ] %}",
  98. "#00ff00",
  99. "{% elseif tags.cycleway in [ 'track' ] or attribute(tags, 'cycleway:right') in [ 'track', 'opposite_track' ] %}",
  100. "#00af00",
  101. "{% endif %}"
  102. ],
  103. "offset": "3",
  104. "text": [
  105. "{% if attribute(tags, 'cycleway:right') in [ 'lane', 'shared_lane', 'track' ] %}",
  106. "🡪 ",
  107. "{% elseif attribute(tags, 'cycleway:right') in [ 'opposite_lane', 'opposite_track' ] %}",
  108. "🡨 ",
  109. "{% elseif driving_side == 'right' and oneway >= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}",
  110. "🡪 ",
  111. "{% elseif driving_side == 'left' and oneway <= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}",
  112. "🡨 ",
  113. "{% elseif driving_side == 'right' and oneway >= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}",
  114. "🡨 ",
  115. "{% elseif driving_side == 'left' and oneway <= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}",
  116. "🡪 ",
  117. "{% endif %}"
  118. ],
  119. "textRepeat": "1",
  120. "textOffset": "0"
  121. }
  122. },
  123. "info": [
  124. "<table>",
  125. " <tr>",
  126. " <td>{{ markerLine(evaluate({ \"highway\": \"cycleway\" }))|raw }}</td>",
  127. " <td>{{ tagTrans('highway', 'cycleway') }}</td>",
  128. " </tr>",
  129. " <tr>",
  130. " <td>{{ markerLine(evaluate({ \"cycleway\": \"track\" }))|raw }}</td>",
  131. " <td>{{ tagTrans('cycleway', 'track') }}</td>",
  132. " </tr>",
  133. " <tr>",
  134. " <td>{{ markerLine(evaluate({ \"cycleway\": \"lane\" }))|raw }}</td>",
  135. " <td>{{ tagTrans('cycleway', 'lane') }}</td>",
  136. " </tr>",
  137. "</table>"
  138. ]
  139. }