Main categories of OpenStreetBrowser
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.

287 lines
12 KiB

  1. query:
  2. 10: |
  3. (
  4. way["parking:left"];way["parking:right"];way["parking:both"];
  5. way["parking:lane:left"];way["parking:lane:right"];way["parking:lane:both"];
  6. )
  7. feature:
  8. pre: |
  9. {% set deprecated = attribute(tags, 'parking:lane:left') or attribute(tags, 'parking:lane:right') or attribute(tags, 'parking:lane:both') %}
  10. {% set leftOrientation = attribute(tags, 'parking:left:orientation')|default(attribute(tags, 'parking:lane:left'))|default(attribute(tags, 'parking:both:orientation'))|default(attribute(tags, 'parking:lane:both'))|default('unknown') %}
  11. {% set rightOrientation = attribute(tags, 'parking:right:orientation')|default(attribute(tags, 'parking:lane:right'))|default(attribute(tags, 'parking:both:orientation'))|default(attribute(tags, 'parking:lane:both'))|default('unknown') %}
  12. {% set leftType = attribute(tags, 'parking:left')|default(attribute(tags, 'parking:lane:left:' ~ leftOrientation))|default(attribute(tags, 'parking:both'))|default(attribute(tags, 'parking:lane:both:' ~ leftOrientation))|default('unknown') %}
  13. {% set rightType = attribute(tags, 'parking:right')|default(attribute(tags, 'parking:lane:right:' ~ rightOrientation))|default(attribute(tags, 'parking:both'))|default(attribute(tags, 'parking:lane:both:' ~ rightOrientation))|default('unknown') %}
  14. {% if (attribute(tags, 'parking:lane:left:' ~ leftOrientation) or attribute(tags, 'parking:lane:both:' ~ leftOrientation)) and leftType == 'on_street' %}
  15. {% set leftType = 'lane' %}
  16. {% endif %}
  17. {% if (attribute(tags, 'parking:lane:right:' ~ rightOrientation) or attribute(tags, 'parking:lane:both:' ~ rightOrientation)) and rightType == 'on_street' %}
  18. {% set rightType = 'lane' %}
  19. {% endif %}
  20. {% set leftCondition = 'undefined' %}
  21. {% if attribute(tags, 'parking:left:fee')|default(attribute(tags, 'parking:both:fee')) == 'no' %}
  22. {% set leftRestriction = 'free' %}
  23. {% endif %}
  24. {% if attribute(tags, 'parking:left:maxstay')|default(attribute(tags, 'parking:both:maxstay')) not in [undefined, 'no'] %}
  25. {% set leftRestriction = 'free_time_limit' %}
  26. {% endif %}
  27. {% if attribute(tags, 'parking:left:fee')|default(attribute(tags, 'parking:both:fee')) not in [undefined, 'no'] or attribute(tags, 'parking:left:fee:conditional')|default(attribute(tags, 'parking:both:fee:conditional')) matches '/yes/' %}
  28. {% set leftRestriction = 'paid' %}
  29. {% endif %}
  30. {% if attribute(tags, 'parking:left:access')|default(attribute(tags, 'parking:both:access')) == 'customers' or attribute(tags, 'parking:left:access:conditional')|default(attribute(tags, 'parking:both:access:conditional')) matches '/customers/' %}
  31. {% set leftRestriction = 'customers' %}
  32. {% endif %}
  33. {% if attribute(tags, 'parking:left:access')|default(attribute(tags, 'parking:both:access')) == 'no' or attribute(tags, 'parking:left:access:conditional')|default(attribute(tags, 'parking:both:access:conditional')) matches '/no/' %}
  34. {% set leftRestriction = 'non_public' %}
  35. {% endif %}
  36. {% if attribute(tags, 'parking:left:disabled')|default(attribute(tags, 'parking:both:disabled')) not in [undefined, 'no'] or attribute(tags, 'parking:left:disabled:conditional')|default(attribute(tags, 'parking:both:disabled:conditional')) %}
  37. {% set leftRestriction = 'disabled' %}
  38. {% endif %}
  39. {% if attribute(tags, 'parking:left')|default(attribute(tags, 'parking:both')) == 'no' and attribute(tags, 'parking:left:reason')|default(attribute(tags, 'parking:both:reason')) %}
  40. {% set leftRestriction = 'reason' %}
  41. {% endif %}
  42. {% for r in ['charging_only', 'loading_only', 'no_parking', 'no_standing', 'no_stopping'] %}
  43. {% if attribute(tags, 'parking:left:restriction')|default(attribute(tags, 'parking:both:restriction')) == r or attribute(tags, 'parking:left:restriction:conditional')|default(attribute(tags, 'parking:both:restriction:conditional')) matches ('/' ~ r ~ '/') %}
  44. {% set leftRestriction = r %}
  45. {% endif %}
  46. {% endfor %}
  47. {% set rightCondition = 'undefined' %}
  48. {% if attribute(tags, 'parking:right:fee')|default(attribute(tags, 'parking:both:fee')) == 'no' %}
  49. {% set rightRestriction = 'free' %}
  50. {% endif %}
  51. {% if attribute(tags, 'parking:right:maxstay')|default(attribute(tags, 'parking:both:maxstay')) not in [undefined, 'no'] %}
  52. {% set rightRestriction = 'free_time_limit' %}
  53. {% endif %}
  54. {% if attribute(tags, 'parking:right:fee')|default(attribute(tags, 'parking:both:fee')) not in [undefined, 'no'] or attribute(tags, 'parking:right:fee:conditional')|default(attribute(tags, 'parking:both:fee:conditional')) matches '/yes/' %}
  55. {% set rightRestriction = 'paid' %}
  56. {% endif %}
  57. {% if attribute(tags, 'parking:right:access')|default(attribute(tags, 'parking:both:access')) == 'customers' or attribute(tags, 'parking:right:access:conditional')|default(attribute(tags, 'parking:both:access:conditional')) matches '/customers/' %}
  58. {% set rightRestriction = 'customers' %}
  59. {% endif %}
  60. {% if attribute(tags, 'parking:right:access')|default(attribute(tags, 'parking:both:access')) == 'no' or attribute(tags, 'parking:right:access:conditional')|default(attribute(tags, 'parking:both:access:conditional')) matches '/no/' %}
  61. {% set rightRestriction = 'non_public' %}
  62. {% endif %}
  63. {% if attribute(tags, 'parking:right:disabled')|default(attribute(tags, 'parking:both:disabled')) not in [undefined, 'no'] or attribute(tags, 'parking:right:disabled:conditional')|default(attribute(tags, 'parking:both:disabled:conditional')) %}
  64. {% set rightRestriction = 'disabled' %}
  65. {% endif %}
  66. {% if attribute(tags, 'parking:right')|default(attribute(tags, 'parking:both')) == 'no' and attribute(tags, 'parking:right:reason')|default(attribute(tags, 'parking:both:reason')) %}
  67. {% set rightRestriction = 'reason' %}
  68. {% endif %}
  69. {% for r in ['charging_only', 'loading_only', 'no_parking', 'no_standing', 'no_stopping'] %}
  70. {% if attribute(tags, 'parking:right:restriction')|default(attribute(tags, 'parking:both:restriction')) == r or attribute(tags, 'parking:right:restriction:conditional')|default(attribute(tags, 'parking:both:restriction:conditional')) matches ('/' ~ r ~ '/') %}
  71. {% set rightRestriction = r %}
  72. {% endif %}
  73. {% endfor %}
  74. body: |
  75. Left: <ul>
  76. <li>Type: {{ leftType }}</li>
  77. {% if leftType not in ['no', 'separate'] %}
  78. <li>Orientation: {{ leftOrientation }}</li>
  79. {% endif %}
  80. </ul>
  81. Right: <ul>
  82. <li>Type: {{ rightType }}</li>
  83. {% if rightType not in ['no', 'separate'] %}
  84. <li>Orientation: {{ rightOrientation }}</li>
  85. {% endif %}
  86. </ul>
  87. {% if deprecated %}<div class='warning'>{{ repoTrans('deprecated', 'parking:lane:left/right/both', 'https://wiki.openstreetmap.org/wiki/Key:parking:lane')|raw }}</div>{% endif %}
  88. markerSymbol: ''
  89. listMarkerSymbol: line
  90. details: |
  91. Left: {{ leftType }} / {{ leftOrientation }}<br>
  92. Right: {{ rightType }} / {{ rightOrientation }}
  93. styles: |
  94. default
  95. {% if leftType == 'separate' %}
  96. ,leftSeparate
  97. {% elseif leftType in ['no', 'unknown'] and leftOrientation == 'unknown' %}
  98. ,leftType
  99. {% else %}
  100. ,leftType,leftOrientation
  101. {% endif %}
  102. {% if rightType == 'separate' %}
  103. ,rightSeparate
  104. {% elseif rightType in ['no', 'unknown'] and rightOrientation == 'unknown' %}
  105. ,rightType
  106. {% else %}
  107. ,rightType,rightOrientation
  108. {% endif %}
  109. style:
  110. color: |
  111. {{ deprecated ? '#ff0000' : '#7f7f7f' }}
  112. style:leftType:
  113. color: |
  114. {{ const.restriction[leftRestriction].color }}
  115. offset: |
  116. {{ 0 - ((const.orientation[leftOrientation].width) * const.type[leftType].kerbPosition + (const.type[leftType].width / 2) + 4) }}
  117. lineCap: butt
  118. width: |
  119. {{ const.type[leftType].width }}
  120. dashArray: |
  121. {{ const.type[leftType].dashArray }}
  122. style:leftOrientation:
  123. color: |
  124. {{ const.restriction[leftRestriction].color }}
  125. offset: |
  126. {{ 0 - ((const.type[leftType].width) * (1 - const.type[leftType].kerbPosition) + const.orientation[leftOrientation].width / 2 + 4) }}
  127. lineCap: butt
  128. width: |
  129. {{ const.orientation[leftOrientation].width }}
  130. dashArray: |
  131. {{ const.orientation[leftOrientation].dashArray }}
  132. style:leftSeparate:
  133. width: 0
  134. pattern: arrowHead
  135. pattern-angleCorrection: -90
  136. pattern-pixelSize: 7
  137. pattern-lineOffset: -10
  138. pattern-polygon: false
  139. pattern-repeat: 15
  140. pattern-path-color: |
  141. {{ const.restriction[leftRestriction].color }}
  142. style:rightType:
  143. color: |
  144. {{ const.restriction[rightRestriction].color }}
  145. offset: |
  146. {{ (const.orientation[rightOrientation].width) * const.type[rightType].kerbPosition + (const.type[rightType].width / 2) + 4 }}
  147. lineCap: butt
  148. width: |
  149. {{ const.type[rightType].width }}
  150. dashArray: |
  151. {{ const.type[rightType].dashArray }}
  152. style:rightOrientation:
  153. color: |
  154. {{ const.restriction[rightRestriction].color }}
  155. offset: |
  156. {{ (const.type[rightType].width) * (1 - const.type[rightType].kerbPosition) + const.orientation[rightOrientation].width / 2 + 4 }}
  157. lineCap: butt
  158. width: |
  159. {{ const.orientation[rightOrientation].width }}
  160. dashArray: |
  161. {{ const.orientation[rightOrientation].dashArray }}
  162. style:rightSeparate:
  163. width: 0
  164. pattern: arrowHead
  165. pattern-angleCorrection: 90
  166. pattern-pixelSize: 7
  167. pattern-lineOffset: 10
  168. pattern-polygon: false
  169. pattern-repeat: 15
  170. pattern-path-color: |
  171. {{ const.restriction[rightRestriction].color }}
  172. info: |
  173. Tagging scheme:
  174. <table>
  175. <tr>
  176. <td>{{ markerLine({ color: '#7f7f7f', width: 2 }) }}</td>
  177. <td><a target='_blank' href="https://wiki.openstreetmap.org/wiki/Street_parking">Street parking</a></td>
  178. </tr>
  179. <tr>
  180. <td>{{ markerLine({ color: '#ff0000', width: 2 }) }}</td>
  181. <td><a target='_blank' href="https://wiki.openstreetmap.org/wiki/Key:parking:lane">Deprecated tagging</a></td>
  182. </tr>
  183. </table>
  184. Parking Type:
  185. <table>
  186. {% for k, def in const.type %}
  187. <tr>
  188. <td>{{ markerLine(evaluate({ 'parking:both': k, 'parking:both:orientation': (k in ['no', 'unknown'] ? '' : 'parallel') })) }}</td>
  189. <td>{{ k }}</td>
  190. </tr>
  191. {% endfor %}
  192. </table>
  193. Parking Orientation:
  194. <table>
  195. {% for k, def in const.orientation %}
  196. <tr>
  197. <td>{{ markerLine(evaluate({ 'parking:both': k, 'parking:both:orientation': (k in ['no', 'unknown'] ? '' : 'parallel') })) }}</td>
  198. <td>{{ k }}</td>
  199. </tr>
  200. {% endfor %}
  201. </table>
  202. Parking Conditions/Restrictions:
  203. <table>
  204. {% for k, def in const.restriction %}
  205. <tr>
  206. <td>{{ markerLine({ color: def.color, width: 5 }) }}</td>
  207. <td>{{ k }}</td>
  208. </tr>
  209. {% endfor %}
  210. </table>
  211. const:
  212. type:
  213. 'no':
  214. width: 6
  215. dashArray: '6,10'
  216. kerbPosition: 0
  217. lane:
  218. width: 2
  219. dashArray: ''
  220. kerbPosition: 1
  221. street_side:
  222. width: 2
  223. dashArray: '5,5'
  224. kerbPosition: 1
  225. half_on_kerb:
  226. width: 2
  227. dashArray: ''
  228. kerbPosition: 0.5
  229. on_kerb:
  230. width: 2
  231. dashArray: ''
  232. kerbPosition: 0
  233. shoulder:
  234. width: 3
  235. dashArray: '5,5'
  236. kerbPosition: 0
  237. separate:
  238. width: 0
  239. dashArray: ''
  240. kerbPosition: 0
  241. unknown:
  242. width: 3
  243. dashArray: '1,1'
  244. kerbPosition: 0
  245. orientation:
  246. parallel:
  247. width: 5
  248. dashArray: '10,3'
  249. diagonal:
  250. width: 8
  251. dashArray: '5,5'
  252. perpendicular:
  253. width: 12
  254. dashArray: '3,3'
  255. unknown:
  256. width: 8
  257. dashArray: '1,1'
  258. restriction:
  259. undefined:
  260. color: '#0000ff'
  261. free:
  262. color: chartreuse
  263. free_time_limit:
  264. color: dodgerblue
  265. paid:
  266. color: hotpink
  267. customers:
  268. color: darkorange
  269. non_public:
  270. color: red
  271. disabled:
  272. color: turquoise
  273. reason:
  274. color: plum
  275. charging_only:
  276. color: limegreen
  277. loading_only:
  278. color: lightcyan
  279. no_parking:
  280. color: orange
  281. no_standing:
  282. color: salmon
  283. no_stopping:
  284. color: red