{
"type": "overpass",
"name": {
"de": "Eisenbahn Elektrifizierung",
"en": "Railway electrification"
},
"query": {
"11": "way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$'];",
"14": "way[railway][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'];"
},
"feature": {
"pre": "{% if tags.electrified and tags.electrified != 'no' %}\n {% if tags.voltage < 1000 %}\n {% set color = colorInterpolate([ '#00ff00', 'blue' ], tags.voltage / 1000) %}\n {% else %}\n {% set color = colorInterpolate([ 'blue', 'red' ], (tags.voltage - 1000) / 24000) %}\n {% endif %}\n{% else %}\n {% set color='black' %}\n{%endif %}\n\n{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}\n {% set weight=2 %}\n {% else %}\n {% if tags.railway == 'rail' %}\n {% if tags.usage == 'main' or tags.usage == 'branch' %}\n {% set weight=3 %}\n {% else %}\n {% set weight=2.5 %}\n {% endif %}\n {% else %}\n {% set weight=2 %}\n {% endif %}\n{% endif %}",
"style:casing": {
"color": "white",
"weight": "{{ weight }}",
"fill": null,
"opacity": "1"
},
"style": {
"color": "{{ color }}",
"weight": "{{ weight }}",
"dashArray": "{% if not tags.electrified or tags.electrified == 'no' %}\n{% elseif tags.frequency == 0 %}\n{% else %}\n5,2\n{% endif %}",
"opacity": "1",
"lineCap": "butt"
},
"styles": "casing,default",
"markerSign": null,
"body": "{{ tagTrans('railway', tags.railway) }}
\n{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
{% endif %}\n{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}
{% endif %}\n{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}
{% endif %}\n{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}
\n{% 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')) }}
{% endif %}\n",
"description": "{{ tagTrans('railway', tags.railway) }} -\n\n{% if tags.electrified == 'no' %}\n {{ trans('not electrified') }}\n{% elseif tags.electrified %}\n {{ tags.voltage|default(trans('unknown')) }}V, {{ tags.frequency|default(trans('unknown')) }}Hz\n{% endif %}",
"priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}",
"title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}",
"listMarkerSymbol": "line"
},
"info": "
{{ markerLine({ 'weight': 3, 'color': color })|raw }} | \n{{ trans('not electrified') }} | \n
{{ markerLine({ 'weight': 3, 'color': color })|raw }} | \n{{ i }}V | \n
{{ markerLine({ 'weight': 3, 'color': color })|raw }} | \n{{ i }}V | \n
{{ markerLine({ 'weight': 3, 'color': color })|raw }} | \n{{ trans('direct current') }} | \n
{{ markerLine({ 'styles': [ 'casing', 'default' ], 'style:casing': { 'weight': 3, 'color': 'white' }, 'style': { 'weight': '3', 'dashArray': '5,2', 'lineCap': 'butt', 'color': color } })|raw }} | \n{{ trans('alternating current') }} | \n