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.

239 lines
9.5 KiB

  1. type: overpass
  2. name:
  3. ca: Infraestructura fèrria
  4. cs: Železniční infrastruktura
  5. de: Eisenbahn Infrastruktur
  6. en: Railway infrastructure
  7. es: Infraestructura ferroviaria
  8. fr: Infrastructure ferroviaire
  9. gl: Infraestrutura do ferrocarril
  10. hu: Vasúti infrastruktúra
  11. it: Infrastruttura ferroviaria
  12. ja: 鉄道インフラ
  13. nb: Jernbane-infrastruktur
  14. nl: Spoorweginfrastructuur
  15. oc: Infrastructura ferroviària
  16. pl: Infrastruktura kolejowa
  17. pt: Infraestrutura ferroviária
  18. pt-br: Infraestrutura ferroviária
  19. ru: Железнодорожная инфраструктура
  20. sr: Железничка инфраструктура
  21. tr: Demiryolu altyapısı
  22. query:
  23. 11: (way[railway=rail][usage~'^(main|branch)$'];node[railway~'^(station)$'];)
  24. 14: (way[railway];node[railway~'^(station|halt|tram_stop)$'];)
  25. 17: (node[railway];way[railway];)
  26. feature:
  27. title: |-
  28. {% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}
  29. {{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }}
  30. {% if attribute(tags, 'tunnel:name') %}- {{ localizedTag(tags, 'tunnel:name') }}{% endif %}
  31. {% if attribute(tags, 'bridge:name') %}- {{ localizedTag(tags, 'bridge:name') }}{% endif %}
  32. description: |-
  33. {{ tagTrans('railway', tags.railway) -}}
  34. {%- if tags.usage %}
  35. , {{ tagTrans('railway=rail usage', tags.usage) }}
  36. {% endif -%}
  37. {%- if tags.service %}
  38. , {{ tagTrans('railway=rail service', tags.service) }}
  39. {% endif -%}
  40. body: |-
  41. {% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}
  42. {% if tags.usage %}{{ keyTrans('railway=rail usage') }}: {{ tagTrans('railway=rail usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}
  43. {% if tags.service %}{{ keyTrans('railway=rail service') }}: {{ tagTrans('railway=rail service', tags.service ) }}<br/>{% endif %}
  44. {{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>
  45. {% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}<br/>{% endif %}
  46. markerSign: '{% if tags.railway in [ ''halt'', ''tram_stop'', ''station'', ''stop'', ''subway_entrance'' ] %}X{% endif %}'
  47. markerSymbol: |-
  48. {% if tags.railway == 'signal' %}
  49. <svg anchorX='5' anchorY='8' width='9' height='15'>
  50. <rect x='0.5' y='0.5' width='8' height='14' style='fill: #000000; fill-opacity: 1;' />
  51. <circle cx='4.5' cy='4.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #7f7f7f;'/>
  52. <circle cx='4.5' cy='10.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #ff0000;'/>
  53. </svg>
  54. {% elseif tags.railway == 'switch' %}
  55. <svg anchorX='5' anchorY='8' width='9' height='15'>
  56. <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />
  57. <line x1='2' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>
  58. <line x1='2' x2='7' y1='10' y2='2' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>
  59. </svg>
  60. {% elseif tags.railway == 'railway_crossing' %}
  61. <svg anchorX='5' anchorY='8' width='9' height='15'>
  62. <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />
  63. <line x1='2' x2='7' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>
  64. <line x1='7' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>
  65. </svg>
  66. {% elseif tags.railway not in [ 'rail', 'tram', 'subway', 'narrow_gauge', 'abandoned', 'disused' ] %}
  67. {{ markerPointer({})|raw }}
  68. {% endif %}
  69. listMarkerSymbol: |-
  70. {% if tags.railway in [ 'station', 'halt', 'tram_stop', 'stop', 'subway_entrance', 'signal', 'switch', 'railway_crossing' ] %}
  71. {% else %}
  72. line
  73. {% endif %}
  74. priority: |-
  75. {% if tags.railway == 'station' %}0
  76. {% elseif tags.railway in [ 'halt' ] %}1
  77. {% elseif tags.railway in [ 'tram_stop', 'stop' ] %}2
  78. {% elseif tags.railway in [ 'subway_entrance' ] %}3
  79. {% else %}5
  80. {% endif %}
  81. styles: |-
  82. {% if tags.bridge and tags.bridge != 'no' %}casing_bridge,{% endif %}
  83. {% if const.color[tags.railway] %}casing,casing_layer,{% endif %}
  84. {% if tags.railway == 'narrow_gauge' %}default,narrow
  85. {% else %}default
  86. {% endif %}
  87. style:
  88. width: |-
  89. {% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}
  90. 1
  91. {% else %}
  92. {% if tags.railway == 'rail' %}
  93. {% if tags.usage == 'main' or tags.usage == 'branch' %}
  94. 3
  95. {% else %}
  96. 2
  97. {% endif %}
  98. {% elseif tags.railway == 'platform' %}
  99. 1
  100. {% elseif tags.railway in [ 'signal', 'switch', 'railway_crossing' ] %}
  101. 0
  102. {% else %}
  103. 2
  104. {% endif %}
  105. {% endif %}
  106. zIndex: |-
  107. {{ tags.layer|default(0) + 10 }}
  108. color: |-
  109. {% set color = tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' ? const.color['rail/' ~ tags.usage]|default(const.color.rail) : const.color[tags.railway]|default(const.color.default) %}
  110. {% if tags.tunnel and tags.tunnel != 'no' %}
  111. {{ colorInterpolate([ color, '#ffffff' ], 0.3) }}
  112. {% else %}
  113. {{ color }}
  114. {% endif %}
  115. opacity: '1'
  116. dashArray: '{% if tags.railway == ''rail'' %}{% elseif tags.railway == ''disused'' %}1,5{% elseif tags.railway == ''abandoned'' %}1,7{% endif %}'
  117. fill: |-
  118. {% if tags.railway == 'platform' %}
  119. 1
  120. {% elseif type == 'node' %}
  121. 1
  122. {% else %}
  123. {% endif %}
  124. fillColor: |-
  125. {% if tags.railway == 'platform' %}
  126. #3f3f3f
  127. {% elseif type == 'node' %}
  128. #ffffff
  129. {% endif %}
  130. fillOpacity: |-
  131. {% if tags.railway == 'platform' %}
  132. 0.2
  133. {% elseif type == 'node' %}
  134. 0
  135. {% endif %}
  136. style:casing:
  137. color: '#ffffff'
  138. pane: casing
  139. width: |-
  140. {% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}
  141. 2
  142. {% else %}
  143. {% if tags.railway == 'rail' %}
  144. {% if tags.usage == 'main' or tags.usage == 'branch' %}
  145. 5
  146. {% else %}
  147. 4
  148. {% endif %}
  149. {% else %}
  150. 3
  151. {% endif %}
  152. {% endif %}
  153. style:casing_layer:
  154. color: '#ffffff'
  155. zIndex: |-
  156. {{ tags.layer|default(0) + 9.99 }}
  157. width: |-
  158. {% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}
  159. 2
  160. {% else %}
  161. {% if tags.railway == 'rail' %}
  162. {% if tags.usage == 'main' or tags.usage == 'branch' %}
  163. 5
  164. {% else %}
  165. 4
  166. {% endif %}
  167. {% else %}
  168. 3
  169. {% endif %}
  170. {% endif %}
  171. lineCap: butt
  172. style:casing_bridge:
  173. color: '#000000'
  174. zIndex: |-
  175. {{ tags.layer|default(0) + 9.98 }}
  176. width: |-
  177. {% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}
  178. 4
  179. {% else %}
  180. {% if tags.railway == 'rail' %}
  181. {% if tags.usage == 'main' or tags.usage == 'branch' %}
  182. 7
  183. {% else %}
  184. 6
  185. {% endif %}
  186. {% else %}
  187. 5
  188. {% endif %}
  189. {% endif %}
  190. lineCap: butt
  191. style:narrow:
  192. width: '{% if tags.service == ''yard'' or tags.service == ''siding'' or tags.service == ''spur'' or tags.service == ''crossover'' %}5{% else %}{% if tags.railway == ''rail'' %}{% if tags.usage == ''main'' or tags.usage == ''branch'' %}7{% else %}6{% endif %}{% elseif tags.railway == ''platform'' %}5{% else %}6{% endif %}{% endif %}'
  193. color: '{% if tags.railway == ''rail'' or tags.railway == ''narrow_gauge'' or tags.railway == ''disused'' %}{% if tags.usage == ''main'' %}#ff8100{% elseif tags.usage == ''branch'' %}#daca00{% else %}#000000{% endif %}{% elseif tags.railway == ''subway'' %}#0000ff{% elseif tags.railway == ''tram'' %}#ff00ff{% elseif tags.railway == ''light_rail'' %}#00BD14{% elseif tags.railway == ''platform'' %}#3f3f3f{% else %}#000000{% endif %}'
  194. lineCap: butt
  195. dashArray: '2,4'
  196. info: |-
  197. <table>
  198. <tr>
  199. <td>{{ markerLine(evaluate({ "railway": "rail", "usage": "main" }))|raw }}</td>
  200. <td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }}</td>
  201. </tr>
  202. <tr>
  203. <td>{{ markerLine(evaluate({ "railway": "rail" }))|raw }}</td>
  204. <td>{{ tagTrans('railway', 'rail') }}</td>
  205. </tr>
  206. <tr>
  207. <td>{{ markerLine(evaluate({ "railway": "narrow_gauge" }))|raw }}</td>
  208. <td>{{ tagTrans('railway', 'narrow_gauge') }}</td>
  209. </tr>
  210. <tr>
  211. <td>{{ markerLine(evaluate({ "railway": "light_rail" }))|raw }}</td>
  212. <td>{{ tagTrans('railway', 'light_rail') }}</td>
  213. </tr>
  214. <tr>
  215. <td>{{ markerLine(evaluate({ "railway": "subway" }))|raw }}</td>
  216. <td>{{ tagTrans('railway', 'subway') }}</td>
  217. </tr>
  218. {% if map.zoom >= 14 %}
  219. <tr>
  220. <td>{{ markerLine(evaluate({ "railway": "tram" }))|raw }}</td>
  221. <td>{{ tagTrans('railway', 'tram') }}</td>
  222. </tr>
  223. {% endif %}
  224. </table>
  225. const:
  226. color:
  227. rail: '#000000'
  228. rail/main: '#ff8100'
  229. rail/branch: '#daca00'
  230. subway: '#0000ff'
  231. tram: '#ff00ff'
  232. light_rail: '#00BD14'
  233. platform: '#3f3f3f'
  234. default: '#000000'