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.

235 lines
8.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. pre: |-
  28. {% set width = 2 %}
  29. {% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}
  30. {% set width = 1 %}
  31. {% elseif tags.railway in ['rail', 'narrow_gauge', 'abandoned', 'disused', 'razed'] %}
  32. {% if tags.usage in ['main', 'branch'] %}
  33. {% set width = 3 %}
  34. {% else %}
  35. {% set width = 2 %}
  36. {% endif %}
  37. {% elseif tags.railway in ['signal', 'switch', 'railway_crossing'] %}
  38. {% set width = 0 %}
  39. {% endif %}
  40. title: |-
  41. {% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}
  42. {{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }}
  43. {% if attribute(tags, 'tunnel:name') %}- {{ localizedTag(tags, 'tunnel:name') }}{% endif %}
  44. {% if attribute(tags, 'bridge:name') %}- {{ localizedTag(tags, 'bridge:name') }}{% endif %}
  45. details: |-
  46. {{ width }}
  47. description: |-
  48. {{ tagTrans('railway', tags.railway) -}}
  49. {%- if tags.usage %}
  50. , {{ tagTrans('railway=rail usage', tags.usage) }}
  51. {% endif -%}
  52. {%- if tags.service %}
  53. , {{ tagTrans('railway=rail service', tags.service) }}
  54. {% endif -%}
  55. body: |-
  56. {% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}
  57. {% if tags.usage %}{{ keyTrans('railway=rail usage') }}: {{ tagTrans('railway=rail usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}
  58. {% if tags.service %}{{ keyTrans('railway=rail service') }}: {{ tagTrans('railway=rail service', tags.service ) }}<br/>{% endif %}
  59. {{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>
  60. {% if tags.electrified == 'no' %}
  61. {{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}
  62. {% elseif tags.electrified %}
  63. {{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}
  64. {% endif %}<br/>
  65. markerSign: |-
  66. {% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}X
  67. {% endif %}
  68. markerSymbol: |-
  69. {% if tags.railway == 'signal' %}
  70. <svg anchorX='5' anchorY='8' width='9' height='15'>
  71. <rect x='0.5' y='0.5' width='8' height='14' style='fill: #000000; fill-opacity: 1;' />
  72. <circle cx='4.5' cy='4.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #7f7f7f;'/>
  73. <circle cx='4.5' cy='10.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #ff0000;'/>
  74. </svg>
  75. {% elseif tags.railway == 'switch' %}
  76. <svg anchorX='5' anchorY='8' width='9' height='15'>
  77. <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />
  78. <line x1='2' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>
  79. <line x1='2' x2='7' y1='10' y2='2' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>
  80. </svg>
  81. {% elseif tags.railway == 'railway_crossing' %}
  82. <svg anchorX='5' anchorY='8' width='9' height='15'>
  83. <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />
  84. <line x1='2' x2='7' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>
  85. <line x1='7' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>
  86. </svg>
  87. {% elseif tags.railway not in [ 'rail', 'tram', 'subway', 'narrow_gauge', 'abandoned', 'disused', 'razed' ] %}
  88. {{ markerPointer({})|raw }}
  89. {% endif %}
  90. listMarkerSymbol: |-
  91. {% if tags.railway in [ 'station', 'halt', 'tram_stop', 'stop', 'subway_entrance', 'signal', 'switch', 'railway_crossing' ] %}
  92. {% else %}
  93. line
  94. {% endif %}
  95. priority: |-
  96. {% if tags.railway == 'station' %}0
  97. {% elseif tags.railway in [ 'halt' ] %}1
  98. {% elseif tags.railway in [ 'tram_stop', 'stop' ] %}2
  99. {% elseif tags.railway in [ 'subway_entrance' ] %}3
  100. {% else %}5
  101. {% endif %}
  102. styles: |-
  103. {% if tags.bridge and tags.bridge != 'no' %}casing_bridge,{% endif %}
  104. {% if const.color[tags.railway] %}casing,casing_layer,{% endif %}
  105. {% if tags.railway in ['abandoned', 'disused', 'razed'] %}disused,{% endif %}
  106. {% if tags.railway == 'narrow_gauge' %}default,narrow
  107. {% else %}default
  108. {% endif %}
  109. style:
  110. width: |-
  111. {{ width }}
  112. zIndex: |-
  113. {{ tags.layer|default(0) + 10 }}
  114. color: |-
  115. {% 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) %}
  116. {% if tags.tunnel and tags.tunnel != 'no' %}
  117. {{ colorInterpolate([ color, '#ffffff' ], 0.3) }}
  118. {% else %}
  119. {{ color }}
  120. {% endif %}
  121. opacity: 1
  122. dashArray: |-
  123. {% if tags.railway == 'disused' %}1,5
  124. {% elseif tags.railway == 'abandoned' %}1,7
  125. {% elseif tags.railway == 'razed' %}1,9
  126. {% endif %}
  127. fill: |-
  128. {% if tags.railway == 'platform' %}
  129. 1
  130. {% elseif type == 'node' %}
  131. 1
  132. {% else %}
  133. {% endif %}
  134. fillColor: |-
  135. {% if tags.railway == 'platform' %}
  136. #3f3f3f
  137. {% elseif type == 'node' %}
  138. #ffffff
  139. {% endif %}
  140. fillOpacity: |-
  141. {% if tags.railway == 'platform' %}
  142. 0.2
  143. {% elseif type == 'node' %}
  144. 0
  145. {% endif %}
  146. style:disused:
  147. width: |-
  148. {{ width }}
  149. zIndex: |-
  150. {{ tags.layer|default(0) + 9.995 }}
  151. color: white
  152. opacity: 1
  153. fill: false
  154. style:casing:
  155. color: '#ffffff'
  156. pane: casing
  157. width: |-
  158. {{ width + 2 }}
  159. style:casing_layer:
  160. color: '#ffffff'
  161. zIndex: |-
  162. {{ tags.layer|default(0) + 9.99 }}
  163. width: |-
  164. {{ width + 2 }}
  165. lineCap: butt
  166. style:casing_bridge:
  167. color: '#000000'
  168. zIndex: |-
  169. {{ tags.layer|default(0) + 9.98 }}
  170. width: |-
  171. {{ width + 4 }}
  172. lineCap: butt
  173. style:narrow:
  174. width: |-
  175. {{ width + 2 }}
  176. color: |-
  177. {% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}
  178. {% if tags.usage == 'main' %}#ff8100
  179. {% elseif tags.usage == 'branch' %}#daca00
  180. {% else %}#000000
  181. {% endif %}
  182. {% elseif tags.railway == 'subway' %}#0000ff
  183. {% elseif tags.railway == 'tram' %}#ff00ff
  184. {% elseif tags.railway == 'light_rail' %}#00BD14
  185. {% elseif tags.railway == 'platform' %}#3f3f3f
  186. {% else %}#000000
  187. {% endif %}
  188. lineCap: butt
  189. dashArray: '2,4'
  190. info: |-
  191. <table>
  192. <tr>
  193. <td>{{ markerLine(evaluate({ "railway": "rail", "usage": "main" }))|raw }}</td>
  194. <td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }}</td>
  195. </tr>
  196. <tr>
  197. <td>{{ markerLine(evaluate({ "railway": "rail" }))|raw }}</td>
  198. <td>{{ tagTrans('railway', 'rail') }}</td>
  199. </tr>
  200. <tr>
  201. <td>{{ markerLine(evaluate({ "railway": "narrow_gauge" }))|raw }}</td>
  202. <td>{{ tagTrans('railway', 'narrow_gauge') }}</td>
  203. </tr>
  204. <tr>
  205. <td>{{ markerLine(evaluate({ "railway": "light_rail" }))|raw }}</td>
  206. <td>{{ tagTrans('railway', 'light_rail') }}</td>
  207. </tr>
  208. <tr>
  209. <td>{{ markerLine(evaluate({ "railway": "subway" }))|raw }}</td>
  210. <td>{{ tagTrans('railway', 'subway') }}</td>
  211. </tr>
  212. {% if map.zoom >= 14 %}
  213. <tr>
  214. <td>{{ markerLine(evaluate({ "railway": "tram" }))|raw }}</td>
  215. <td>{{ tagTrans('railway', 'tram') }}</td>
  216. </tr>
  217. {% endif %}
  218. </table>
  219. const:
  220. color:
  221. rail: '#000000'
  222. rail/main: '#ff8100'
  223. rail/branch: '#daca00'
  224. subway: '#0000ff'
  225. tram: '#ff00ff'
  226. light_rail: '#00BD14'
  227. platform: '#3f3f3f'
  228. default: '#000000'