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.

224 lines
8.3 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'] %}
  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' ] %}
  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 == 'narrow_gauge' %}default,narrow
  106. {% else %}default
  107. {% endif %}
  108. style:
  109. width: |-
  110. {{ width }}
  111. zIndex: |-
  112. {{ tags.layer|default(0) + 10 }}
  113. color: |-
  114. {% 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) %}
  115. {% if tags.tunnel and tags.tunnel != 'no' %}
  116. {{ colorInterpolate([ color, '#ffffff' ], 0.3) }}
  117. {% else %}
  118. {{ color }}
  119. {% endif %}
  120. opacity: 1
  121. dashArray: |-
  122. {% if tags.railway == 'rail' %}
  123. {% elseif tags.railway == 'disused' %}1,5
  124. {% elseif tags.railway == 'abandoned' %}1,7
  125. {% endif %}
  126. fill: |-
  127. {% if tags.railway == 'platform' %}
  128. 1
  129. {% elseif type == 'node' %}
  130. 1
  131. {% else %}
  132. {% endif %}
  133. fillColor: |-
  134. {% if tags.railway == 'platform' %}
  135. #3f3f3f
  136. {% elseif type == 'node' %}
  137. #ffffff
  138. {% endif %}
  139. fillOpacity: |-
  140. {% if tags.railway == 'platform' %}
  141. 0.2
  142. {% elseif type == 'node' %}
  143. 0
  144. {% endif %}
  145. style:casing:
  146. color: '#ffffff'
  147. pane: casing
  148. width: |-
  149. {{ width + 2 }}
  150. style:casing_layer:
  151. color: '#ffffff'
  152. zIndex: |-
  153. {{ tags.layer|default(0) + 9.99 }}
  154. width: |-
  155. {{ width + 2 }}
  156. lineCap: butt
  157. style:casing_bridge:
  158. color: '#000000'
  159. zIndex: |-
  160. {{ tags.layer|default(0) + 9.98 }}
  161. width: |-
  162. {{ width + 4 }}
  163. lineCap: butt
  164. style:narrow:
  165. width: |-
  166. {{ width + 2 }}
  167. color: |-
  168. {% if tags.railway == 'rail' or tags.railway == 'narrow_gauge' or tags.railway == 'disused' %}
  169. {% if tags.usage == 'main' %}#ff8100
  170. {% elseif tags.usage == 'branch' %}#daca00
  171. {% else %}#000000
  172. {% endif %}
  173. {% elseif tags.railway == 'subway' %}#0000ff
  174. {% elseif tags.railway == 'tram' %}#ff00ff
  175. {% elseif tags.railway == 'light_rail' %}#00BD14
  176. {% elseif tags.railway == 'platform' %}#3f3f3f
  177. {% else %}#000000
  178. {% endif %}
  179. lineCap: butt
  180. dashArray: '2,4'
  181. info: |-
  182. <table>
  183. <tr>
  184. <td>{{ markerLine(evaluate({ "railway": "rail", "usage": "main" }))|raw }}</td>
  185. <td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }}</td>
  186. </tr>
  187. <tr>
  188. <td>{{ markerLine(evaluate({ "railway": "rail" }))|raw }}</td>
  189. <td>{{ tagTrans('railway', 'rail') }}</td>
  190. </tr>
  191. <tr>
  192. <td>{{ markerLine(evaluate({ "railway": "narrow_gauge" }))|raw }}</td>
  193. <td>{{ tagTrans('railway', 'narrow_gauge') }}</td>
  194. </tr>
  195. <tr>
  196. <td>{{ markerLine(evaluate({ "railway": "light_rail" }))|raw }}</td>
  197. <td>{{ tagTrans('railway', 'light_rail') }}</td>
  198. </tr>
  199. <tr>
  200. <td>{{ markerLine(evaluate({ "railway": "subway" }))|raw }}</td>
  201. <td>{{ tagTrans('railway', 'subway') }}</td>
  202. </tr>
  203. {% if map.zoom >= 14 %}
  204. <tr>
  205. <td>{{ markerLine(evaluate({ "railway": "tram" }))|raw }}</td>
  206. <td>{{ tagTrans('railway', 'tram') }}</td>
  207. </tr>
  208. {% endif %}
  209. </table>
  210. const:
  211. color:
  212. rail: '#000000'
  213. rail/main: '#ff8100'
  214. rail/branch: '#daca00'
  215. subway: '#0000ff'
  216. tram: '#ff00ff'
  217. light_rail: '#00BD14'
  218. platform: '#3f3f3f'
  219. default: '#000000'