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.

125 lines
5.4 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. ")"
  15. ]
  16. },
  17. "feature": {
  18. "pre": [
  19. "{% set oneway = 0 %}",
  20. "{% if tags.oneway in [ 'yes', '1' ] %}{% set oneway = 1 %}",
  21. "{% elseif tags.oneway in [ '-1' ] %}{% set oneway = -1 %}",
  22. "{% endif %}",
  23. "",
  24. "{% set driving_side = 'right' %}"
  25. ],
  26. "markerSymbol": null,
  27. "listMarkerSymbol": "line",
  28. "styles": "default,left,right",
  29. "style": {
  30. "color": [
  31. "{% if tags.highway == 'cycleway' %}",
  32. "#007f00",
  33. "{% endif %}"
  34. ],
  35. "text": [
  36. "{% if tags.highway == 'cycleway' and oneway == 1 %}",
  37. "🡪 ",
  38. "{% elseif tags.highway == 'cycleway' and oneway == -1 %}",
  39. "🡨 ",
  40. "{% elseif oneway == 1 and tags.cycleway in [ 'opposite' ] %}",
  41. "🡨🡺 ",
  42. "{% 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' %}",
  43. "🡨🡺 ",
  44. "{% elseif oneway == -1 and tags.cycleway in [ 'opposite' ] %}",
  45. "🡸🡪 ",
  46. "{% 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' %}",
  47. "🡸🡪 ",
  48. "{% elseif oneway == 1 %}",
  49. "🡺 ",
  50. "{% elseif oneway == -1 %}",
  51. "🡸 ",
  52. "{% endif %}",
  53. ""
  54. ],
  55. "textRepeat": "1"
  56. },
  57. "style:highlight": null,
  58. "style:left": {
  59. "color": [
  60. "{% if tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_lane' ] %}",
  61. "#00ff00",
  62. "{% elseif tags.oneway in [ 'yes', '1' ] and tags.cycleway in [ 'opposite_track' ] %}",
  63. "#00af00",
  64. "{% endif %}"
  65. ],
  66. "offset": "-3",
  67. "text": [
  68. "{% if attribute(tags, 'cycleway:left') in [ 'lane', 'shared_lane', 'track' ] %}",
  69. "🡪 ",
  70. "{% elseif attribute(tags, 'cycleway:left') in [ 'opposite_lane', 'opposite_track' ] %}",
  71. "🡨 ",
  72. "{% elseif driving_side == 'right' and oneway <= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}",
  73. "🡪 ",
  74. "{% elseif driving_side == 'left' and oneway >= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}",
  75. "🡨 ",
  76. "{% elseif driving_side == 'right' and oneway <= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}",
  77. "🡨 ",
  78. "{% elseif driving_side == 'left' and oneway >= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}",
  79. "🡪 ",
  80. "{% endif %}"
  81. ]
  82. },
  83. "style:right": {
  84. "color": [
  85. "{% if tags.cycleway in [ 'lane' ] or attribute(tags, 'cycleway:right') in [ 'lane', 'opposite_lane' ] %}",
  86. "#00ff00",
  87. "{% elseif tags.cycleway in [ 'track' ] or attribute(tags, 'cycleway:right') in [ 'track', 'opposite_track' ] %}",
  88. "#00af00",
  89. "{% endif %}"
  90. ],
  91. "offset": "3",
  92. "text": [
  93. "{% if attribute(tags, 'cycleway:right') in [ 'lane', 'shared_lane', 'track' ] %}",
  94. "🡪 ",
  95. "{% elseif attribute(tags, 'cycleway:right') in [ 'opposite_lane', 'opposite_track' ] %}",
  96. "🡨 ",
  97. "{% elseif driving_side == 'right' and oneway >= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}",
  98. "🡪 ",
  99. "{% elseif driving_side == 'left' and oneway <= 0 and tags.cycleway in [ 'lane', 'shared_lane', 'track' ] %}",
  100. "🡨 ",
  101. "{% elseif driving_side == 'right' and oneway >= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}",
  102. "🡨 ",
  103. "{% elseif driving_side == 'left' and oneway <= 0 and tags.cycleway in [ 'opposite_lane', 'opposite_track' ] %}",
  104. "🡪 ",
  105. "{% endif %}"
  106. ]
  107. }
  108. },
  109. "info": [
  110. "<table>",
  111. " <tr>",
  112. " <td>{{ markerLine(evaluate({ \"highway\": \"cycleway\" }))|raw }}</td>",
  113. " <td>{{ tagTrans('highway', 'cycleway') }}</td>",
  114. " </tr>",
  115. " <tr>",
  116. " <td>{{ markerLine(evaluate({ \"cycleway\": \"track\" }))|raw }}</td>",
  117. " <td>{{ tagTrans('cycleway', 'track') }}</td>",
  118. " </tr>",
  119. " <tr>",
  120. " <td>{{ markerLine(evaluate({ \"cycleway\": \"lane\" }))|raw }}</td>",
  121. " <td>{{ tagTrans('cycleway', 'lane') }}</td>",
  122. " </tr>",
  123. "</table>"
  124. ]
  125. }