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.

114 lines
4.8 KiB

  1. type: overpass
  2. name:
  3. ca: Ample de via fèrria
  4. cs: Rozchod železnice
  5. de: Eisenbahn-Spurweite
  6. en: Railway gauge
  7. es: Ancho de vía
  8. fr: Écartement des rails
  9. gl: Anchura de vía
  10. hu: Vasúti nyomtáv
  11. it: Scartamento Ferroviario
  12. ja: 軌間
  13. nb: Sporvidde
  14. oc: Ample dei vias
  15. pl: Rozstaw szyn
  16. pt: Bitola
  17. pt-br: Bitola
  18. ru: Железнодорожная колея
  19. tr: Demiryolu hat açıklığı
  20. query:
  21. 11: way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$'];
  22. 14: way[railway~'^(disused|construction|funicular|light_rail|miniature|monorail|narrow_gauge|preserved|rail|subway|tram)$'];
  23. feature:
  24. pre: |-
  25. {% set gauges = tags.gauge|split(';')|sort|reverse %}
  26. {% set width = max(3, 3 / map.metersPerPixel) %}
  27. title: '{% if tags.ref %}{{ localizedTag(tags, ''ref'') }} - {% endif %}{{ localizedTag(tags, ''name'')|default(localizedTag(tags, ''operator'')) }}'
  28. description: '{{ tagTrans(''railway'', tags.railway) }}'
  29. details: '{{ tags.gauge|default(trans(''unknown''))|enumerate }}'
  30. body: |-
  31. {{ tagTrans('railway', tags.railway) }}<br/>
  32. {% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}
  33. {% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}
  34. {% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}
  35. {{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown'))|enumerate }}<br/>
  36. {% 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 %}
  37. markerSymbol: null
  38. listMarkerSymbol: line
  39. styles: '{% if gauges|length < 2 %}default{% else %}{% for i, v in gauges %}{% if i != 0 %},{% endif %}gauge{{ i }}{% endfor %}{% endif %}{% if gauges|length > 0 and map.zoom >= 18 %},rail{% for i, v in gauges %},rail{{ i }}{% endfor %}{% endif %}'
  40. style:
  41. width: '{{ width }}'
  42. pane: casing
  43. color: '{% if tags.gauge %}{% if not tags.gauge|matches(''^\d+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], tags.gauge / 2000) }}{% endif %}{% else %}#404040{% endif %}'
  44. style:rail:
  45. width: '1'
  46. color: '#ffffff'
  47. offset: '{{ gauges[0] / -2000 }}m'
  48. style:gauge0:
  49. width: '{{ width }}'
  50. pane: casing
  51. lineCap: butt
  52. color: '{% if not gauges[0]|matches(''^[0-9]+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], gauges[0] / 2000) }}{% endif %}'
  53. dashArray: '5,{{ (gauges|length - 1) * 5 }}'
  54. style:rail0:
  55. width: '1'
  56. color: '#ffffff'
  57. offset: '{{ gauges[0] / 2000 }}m'
  58. style:gauge1:
  59. width: '{{ width }}'
  60. pane: casing
  61. lineCap: butt
  62. color: '{% if not gauges[1]|matches(''^[0-9]+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], gauges[1] / 2000) }}{% endif %}'
  63. dashArray: '5,{{ (gauges|length - 1) * 5 }}'
  64. dashOffset: '5'
  65. style:rail1:
  66. width: '1'
  67. color: '#ffffff'
  68. offset: '{{ gauges[0] / -2000 + gauges[1] / 1000 }}m'
  69. style:gauge2:
  70. width: '{{ width }}'
  71. pane: casing
  72. lineCap: butt
  73. color: '{% if not gauges[2]|matches(''^\d+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], gauges[2] / 2000) }}{% endif %}'
  74. dashArray: '5,{{ (gauges|length - 1) * 5 }}'
  75. dashOffset: '10'
  76. style:rail2:
  77. width: '1'
  78. color: '#ffffff'
  79. offset: '{{ gauges[0] / -2000 + gauges[2] / 1000 }}m'
  80. style:gauge3:
  81. width: '{{ width }}'
  82. pane: casing
  83. lineCap: butt
  84. color: '{% if not gauges[3]|matches(''^\d+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], gauges[3] / 2000) }}{% endif %}'
  85. dashArray: '5,{{ (gauges|length - 1) * 5 }}'
  86. dashOffset: '15'
  87. style:rail3:
  88. width: '1'
  89. color: '#ffffff'
  90. offset: '{{ gauges[0] / -2000 + gauges[3] / 1000 }}m'
  91. info: |-
  92. <table>
  93. {% set color = '#ff0000' %}
  94. <tr>
  95. <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>
  96. <td>{{ trans('illegal value') }}</td>
  97. </tr>
  98. {% set color = '#404040' %}
  99. <tr>
  100. <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>
  101. <td>{{ trans('unknown') }}</td>
  102. </tr>
  103. {% for i in range(0, 1800, 250) %}
  104. {% set color = colorInterpolate([ '#00ff00', '#0000ff' ], i / 2000) %}
  105. <tr>
  106. <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>
  107. <td>{{ i }}mm</td>
  108. </tr>
  109. {% endfor %}
  110. <tr>
  111. <td>{{ markerLine({ 'width': 3, 'color': '#0000ff' })|raw }}</td>
  112. <td>>2000mm</td>
  113. </tr>
  114. </table>