Stephan Bösch-Plepelits
3 months ago
10 changed files with 645 additions and 719 deletions
-
165railway-electrification.json
-
149railway-electrification.yaml
-
132railway-gauge.json
-
114railway-gauge.yaml
-
169railway-infrastructure.json
-
152railway-infrastructure.yaml
-
178railway-maxspeed.json
-
164railway-maxspeed.yaml
-
75railway-routes.json
-
66railway-routes.yaml
@ -1,165 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"ca": "Electrificació de la via fèrria", |
|||
"cs": "Elektrifikovaná železnice", |
|||
"de": "Eisenbahn Elektrifizierung", |
|||
"en": "Railway electrification", |
|||
"es": "Electrificación ferroviaria", |
|||
"fr": "Puissance électrique ferroviaire", |
|||
"gl": "Ferrocarril electrificado", |
|||
"hu": "Vasút villamosítottsága", |
|||
"it": "Elettrificazione ferroviaria", |
|||
"ja": "鉄道の電力", |
|||
"nb": "Jernbane-strømtilførsel", |
|||
"nl": "Spoorwegelektrificatie", |
|||
"oc": "Electrificacion ferroviària", |
|||
"pl": "Elektryfikacja kolei", |
|||
"pt": "Eletrificação ferroviária", |
|||
"pt-br": "Eletrificação ferroviária", |
|||
"ru": "Электрификация железных дорог", |
|||
"tr": "Demiryolu elektrifikasyonu" |
|||
}, |
|||
"query": { |
|||
"11": "way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$'];", |
|||
"14": "way[railway~'^(disused|construction|funicular|light_rail|miniature|monorail|narrow_gauge|preserved|rail|subway|tram)$'];" |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% if tags.electrified and tags.electrified != 'no' %}", |
|||
" {% if not tags.voltage is defined %}", |
|||
" {% set color = const.colorUnknown %}", |
|||
" {% elseif not tags.voltage|matches('^[0-9]+$') %}", |
|||
" {% set color = const.colorIllegal %}", |
|||
" {% elseif tags.voltage < const.range[1] %}", |
|||
" {% set color = colorInterpolate(const.scheme|slice(0, 2), tags.voltage / const.range[1]) %}", |
|||
" {% else %}", |
|||
" {% set color = colorInterpolate(const.scheme|slice(1, 2), (tags.voltage - const.range[1]) / (const.range[2] - const.range[1])) %}", |
|||
" {% endif %}", |
|||
"{% elseif tags.electrified and tags.electrified == 'no' %}", |
|||
" {% set color = const.colorNone %}", |
|||
"{% else %}", |
|||
" {% set color = const.colorUnknown %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}", |
|||
" {% set width=2 %}", |
|||
" {% else %}", |
|||
" {% if tags.railway == 'rail' %}", |
|||
" {% if tags.usage == 'main' or tags.usage == 'branch' %}", |
|||
" {% set width=4 %}", |
|||
" {% else %}", |
|||
" {% set width=3 %}", |
|||
" {% endif %}", |
|||
" {% else %}", |
|||
" {% set width=2 %}", |
|||
" {% endif %}", |
|||
"{% endif %}" |
|||
], |
|||
"title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }}", |
|||
"description": "{{ tagTrans('railway', tags.railway) }}", |
|||
"details": [ |
|||
"{% if tags.electrified == 'no' %}", |
|||
"{{ tagTrans('electrified', 'no') }}", |
|||
"{% elseif tags.electrified %}", |
|||
"{{ tags.voltage|default(trans('unknown')) }}V, {{ tags.frequency|default(trans('unknown')) }}Hz", |
|||
"{% endif %}" |
|||
], |
|||
"body": [ |
|||
"{{ tagTrans('railway', tags.railway) }}<br/>", |
|||
"{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}", |
|||
"{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}", |
|||
"{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}", |
|||
"{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>", |
|||
"{% 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 %}" |
|||
], |
|||
"markerSymbol": null, |
|||
"listMarkerSymbol": "line", |
|||
"styles": "casing,default", |
|||
"priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}", |
|||
"style": { |
|||
"width": "{{ width }}", |
|||
"lineCap": "butt", |
|||
"color": "{{ color }}", |
|||
"opacity": "1", |
|||
"fill": null, |
|||
"dashArray": [ |
|||
"{% if not tags.electrified is defined %}", |
|||
"{% elseif not tags.frequency is defined or tags.frequency == 0 %}", |
|||
"{% else %}", |
|||
"5,2", |
|||
"{% endif %}" |
|||
] |
|||
}, |
|||
"style:casing": { |
|||
"width": "{{ width }}", |
|||
"color": "white", |
|||
"opacity": "1", |
|||
"lineCap": "butt", |
|||
"fill": null |
|||
} |
|||
}, |
|||
"info": [ |
|||
"<table>", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': const.colorNone })|raw }}</td>", |
|||
" <td>{{ trans('not electrified') }}</td>", |
|||
" </tr>", |
|||
"{% for i in range(0, const.range[1], const.infoSteps[0]) %}", |
|||
" {% set color = colorInterpolate(const.scheme|slice(0, 2), i / const.range[1]) %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>", |
|||
" <td>{{ i }}V</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
"", |
|||
"{% for i in range(const.range[1] + const.infoSteps[1], const.range[2], const.infoSteps[1]) %}", |
|||
" {% set color = colorInterpolate(const.scheme|slice(1, 2), (i - const.range[1]) / (const.range[2] - const.range[1])) %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>", |
|||
" <td>{{ i }}V</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
"", |
|||
"{% set color = const.scheme[1] %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>", |
|||
" <td>{{ trans('tag:frequency=0') }}</td>", |
|||
" </tr>", |
|||
"", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'styles': [ 'casing', 'default' ], 'style:casing': { 'width': 3, 'color': 'white' }, 'style': { 'width': '3', 'dashArray': '5,2', 'lineCap': 'butt', 'color': color } })|raw }}</td>", |
|||
" <td>{{ trans('tag:frequency>0') }}</td>", |
|||
" </tr>", |
|||
"", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': const.colorUnknown })|raw }}</td>", |
|||
" <td>{{ trans('unknown') }}</td>", |
|||
" </tr>", |
|||
"", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': const.colorIllegal })|raw }}</td>", |
|||
" <td>{{ trans('illegal value') }}</td>", |
|||
" </tr>", |
|||
"</table>" |
|||
], |
|||
"const": { |
|||
"range": [ |
|||
0, |
|||
1000, |
|||
25000 |
|||
], |
|||
"infoSteps": [ |
|||
200, |
|||
2000 |
|||
], |
|||
"scheme": [ |
|||
"#00ff00", |
|||
"#003fff", |
|||
"#af0000" |
|||
], |
|||
"colorNone": "orange", |
|||
"colorUnknown": "#404040", |
|||
"colorIllegal": "#ff0000" |
|||
} |
|||
} |
@ -0,0 +1,149 @@ |
|||
type: overpass |
|||
name: |
|||
ca: Electrificació de la via fèrria |
|||
cs: Elektrifikovaná železnice |
|||
de: Eisenbahn Elektrifizierung |
|||
en: Railway electrification |
|||
es: Electrificación ferroviaria |
|||
fr: Puissance électrique ferroviaire |
|||
gl: Ferrocarril electrificado |
|||
hu: Vasút villamosítottsága |
|||
it: Elettrificazione ferroviaria |
|||
ja: 鉄道の電力 |
|||
nb: Jernbane-strømtilførsel |
|||
nl: Spoorwegelektrificatie |
|||
oc: Electrificacion ferroviària |
|||
pl: Elektryfikacja kolei |
|||
pt: Eletrificação ferroviária |
|||
pt-br: Eletrificação ferroviária |
|||
ru: Электрификация железных дорог |
|||
tr: Demiryolu elektrifikasyonu |
|||
query: |
|||
11: way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$']; |
|||
14: way[railway~'^(disused|construction|funicular|light_rail|miniature|monorail|narrow_gauge|preserved|rail|subway|tram)$']; |
|||
feature: |
|||
pre: |- |
|||
{% if tags.electrified and tags.electrified != 'no' %} |
|||
{% if not tags.voltage is defined %} |
|||
{% set color = const.colorUnknown %} |
|||
{% elseif not tags.voltage|matches('^[0-9]+$') %} |
|||
{% set color = const.colorIllegal %} |
|||
{% elseif tags.voltage < const.range[1] %} |
|||
{% set color = colorInterpolate(const.scheme|slice(0, 2), tags.voltage / const.range[1]) %} |
|||
{% else %} |
|||
{% set color = colorInterpolate(const.scheme|slice(1, 2), (tags.voltage - const.range[1]) / (const.range[2] - const.range[1])) %} |
|||
{% endif %} |
|||
{% elseif tags.electrified and tags.electrified == 'no' %} |
|||
{% set color = const.colorNone %} |
|||
{% else %} |
|||
{% set color = const.colorUnknown %} |
|||
{% endif %} |
|||
|
|||
{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %} |
|||
{% set width=2 %} |
|||
{% else %} |
|||
{% if tags.railway == 'rail' %} |
|||
{% if tags.usage == 'main' or tags.usage == 'branch' %} |
|||
{% set width=4 %} |
|||
{% else %} |
|||
{% set width=3 %} |
|||
{% endif %} |
|||
{% else %} |
|||
{% set width=2 %} |
|||
{% endif %} |
|||
{% endif %} |
|||
title: '{% if tags.ref %}{{ localizedTag(tags, ''ref'') }} - {% endif %}{{ localizedTag(tags, ''name'')|default(localizedTag(tags, ''operator'')) }}' |
|||
description: '{{ tagTrans(''railway'', tags.railway) }}' |
|||
details: |- |
|||
{% if tags.electrified == 'no' %} |
|||
{{ tagTrans('electrified', 'no') }} |
|||
{% elseif tags.electrified %} |
|||
{{ tags.voltage|default(trans('unknown')) }}V, {{ tags.frequency|default(trans('unknown')) }}Hz |
|||
{% endif %} |
|||
body: |- |
|||
{{ tagTrans('railway', tags.railway) }}<br/> |
|||
{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %} |
|||
{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %} |
|||
{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %} |
|||
{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/> |
|||
{% 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 %} |
|||
markerSymbol: null |
|||
listMarkerSymbol: line |
|||
styles: casing,default |
|||
priority: '{% if tags.railway == ''station'' %}0{% elseif tags.railway in [ ''halt'', ''tram_stop'' ] %}1{% else %}5{% endif %}' |
|||
style: |
|||
width: '{{ width }}' |
|||
lineCap: butt |
|||
color: '{{ color }}' |
|||
opacity: '1' |
|||
fill: null |
|||
dashArray: |- |
|||
{% if not tags.electrified is defined %} |
|||
{% elseif not tags.frequency is defined or tags.frequency == 0 %} |
|||
{% else %} |
|||
5,2 |
|||
{% endif %} |
|||
style:casing: |
|||
width: '{{ width }}' |
|||
color: white |
|||
opacity: '1' |
|||
lineCap: butt |
|||
fill: null |
|||
info: |- |
|||
<table> |
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': const.colorNone })|raw }}</td> |
|||
<td>{{ trans('not electrified') }}</td> |
|||
</tr> |
|||
{% for i in range(0, const.range[1], const.infoSteps[0]) %} |
|||
{% set color = colorInterpolate(const.scheme|slice(0, 2), i / const.range[1]) %} |
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td> |
|||
<td>{{ i }}V</td> |
|||
</tr> |
|||
{% endfor %} |
|||
|
|||
{% for i in range(const.range[1] + const.infoSteps[1], const.range[2], const.infoSteps[1]) %} |
|||
{% set color = colorInterpolate(const.scheme|slice(1, 2), (i - const.range[1]) / (const.range[2] - const.range[1])) %} |
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td> |
|||
<td>{{ i }}V</td> |
|||
</tr> |
|||
{% endfor %} |
|||
|
|||
{% set color = const.scheme[1] %} |
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td> |
|||
<td>{{ trans('tag:frequency=0') }}</td> |
|||
</tr> |
|||
|
|||
<tr> |
|||
<td>{{ markerLine({ 'styles': [ 'casing', 'default' ], 'style:casing': { 'width': 3, 'color': 'white' }, 'style': { 'width': '3', 'dashArray': '5,2', 'lineCap': 'butt', 'color': color } })|raw }}</td> |
|||
<td>{{ trans('tag:frequency>0') }}</td> |
|||
</tr> |
|||
|
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': const.colorUnknown })|raw }}</td> |
|||
<td>{{ trans('unknown') }}</td> |
|||
</tr> |
|||
|
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': const.colorIllegal })|raw }}</td> |
|||
<td>{{ trans('illegal value') }}</td> |
|||
</tr> |
|||
</table> |
|||
const: |
|||
range: |
|||
- 0 |
|||
- 1000 |
|||
- 25000 |
|||
infoSteps: |
|||
- 200 |
|||
- 2000 |
|||
scheme: |
|||
- '#00ff00' |
|||
- '#003fff' |
|||
- '#af0000' |
|||
colorNone: orange |
|||
colorUnknown: '#404040' |
|||
colorIllegal: '#ff0000' |
@ -1,132 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"ca": "Ample de via fèrria", |
|||
"cs": "Rozchod železnice", |
|||
"de": "Eisenbahn-Spurweite", |
|||
"en": "Railway gauge", |
|||
"es": "Ancho de vía", |
|||
"fr": "Écartement des rails", |
|||
"gl": "Anchura de vía", |
|||
"hu": "Vasúti nyomtáv", |
|||
"it": "Scartamento Ferroviario", |
|||
"ja": "軌間", |
|||
"nb": "Sporvidde", |
|||
"oc": "Ample dei vias", |
|||
"pl": "Rozstaw szyn", |
|||
"pt": "Bitola", |
|||
"pt-br": "Bitola", |
|||
"ru": "Железнодорожная колея", |
|||
"tr": "Demiryolu hat açıklığı" |
|||
}, |
|||
"query": { |
|||
"11": "way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$'];", |
|||
"14": "way[railway~'^(disused|construction|funicular|light_rail|miniature|monorail|narrow_gauge|preserved|rail|subway|tram)$'];" |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% set gauges = tags.gauge|split(';')|sort|reverse %}", |
|||
"{% set width = max(3, 3 / map.metersPerPixel) %}" |
|||
], |
|||
"title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }}", |
|||
"description": "{{ tagTrans('railway', tags.railway) }}", |
|||
"details": "{{ tags.gauge|default(trans('unknown'))|enumerate }}", |
|||
"body": [ |
|||
"{{ tagTrans('railway', tags.railway) }}<br/>", |
|||
"{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}", |
|||
"{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}", |
|||
"{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}", |
|||
"{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown'))|enumerate }}<br/>", |
|||
"{% 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 %}" |
|||
], |
|||
"markerSymbol": null, |
|||
"listMarkerSymbol": "line", |
|||
"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 %}", |
|||
"style": { |
|||
"width": "{{ width }}", |
|||
"pane": "casing", |
|||
"color": "{% if tags.gauge %}{% if not tags.gauge|matches('^\\d+$') %}#ff0000{% else %}{{ colorInterpolate([ '#00ff00', '#0000ff' ], tags.gauge / 2000) }}{% endif %}{% else %}#404040{% endif %}" |
|||
}, |
|||
"style:rail": { |
|||
"width": "1", |
|||
"color": "#ffffff", |
|||
"offset": "{{ gauges[0] / -2000 }}m" |
|||
}, |
|||
"style:gauge0": { |
|||
"width": "{{ width }}", |
|||
"pane": "casing", |
|||
"lineCap": "butt", |
|||
"color": "{% if not gauges[0]|matches('^[0-9]+$') %}#ff0000{% else %}{{ colorInterpolate([ '#00ff00', '#0000ff' ], gauges[0] / 2000) }}{% endif %}", |
|||
"dashArray": "5,{{ (gauges|length - 1) * 5 }}" |
|||
}, |
|||
"style:rail0": { |
|||
"width": "1", |
|||
"color": "#ffffff", |
|||
"offset": "{{ gauges[0] / 2000 }}m" |
|||
}, |
|||
"style:gauge1": { |
|||
"width": "{{ width }}", |
|||
"pane": "casing", |
|||
"lineCap": "butt", |
|||
"color": "{% if not gauges[1]|matches('^[0-9]+$') %}#ff0000{% else %}{{ colorInterpolate([ '#00ff00', '#0000ff' ], gauges[1] / 2000) }}{% endif %}", |
|||
"dashArray": "5,{{ (gauges|length - 1) * 5 }}", |
|||
"dashOffset": "5" |
|||
}, |
|||
"style:rail1": { |
|||
"width": "1", |
|||
"color": "#ffffff", |
|||
"offset": "{{ gauges[0] / -2000 + gauges[1] / 1000 }}m" |
|||
}, |
|||
"style:gauge2": { |
|||
"width": "{{ width }}", |
|||
"pane": "casing", |
|||
"lineCap": "butt", |
|||
"color": "{% if not gauges[2]|matches('^\\d+$') %}#ff0000{% else %}{{ colorInterpolate([ '#00ff00', '#0000ff' ], gauges[2] / 2000) }}{% endif %}", |
|||
"dashArray": "5,{{ (gauges|length - 1) * 5 }}", |
|||
"dashOffset": "10" |
|||
}, |
|||
"style:rail2": { |
|||
"width": "1", |
|||
"color": "#ffffff", |
|||
"offset": "{{ gauges[0] / -2000 + gauges[2] / 1000 }}m" |
|||
}, |
|||
"style:gauge3": { |
|||
"width": "{{ width }}", |
|||
"pane": "casing", |
|||
"lineCap": "butt", |
|||
"color": "{% if not gauges[3]|matches('^\\d+$') %}#ff0000{% else %}{{ colorInterpolate([ '#00ff00', '#0000ff' ], gauges[3] / 2000) }}{% endif %}", |
|||
"dashArray": "5,{{ (gauges|length - 1) * 5 }}", |
|||
"dashOffset": "15" |
|||
}, |
|||
"style:rail3": { |
|||
"width": "1", |
|||
"color": "#ffffff", |
|||
"offset": "{{ gauges[0] / -2000 + gauges[3] / 1000 }}m" |
|||
} |
|||
}, |
|||
"info": [ |
|||
"<table>", |
|||
" {% set color = '#ff0000' %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>", |
|||
" <td>{{ trans('illegal value') }}</td>", |
|||
" </tr>", |
|||
" {% set color = '#404040' %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>", |
|||
" <td>{{ trans('unknown') }}</td>", |
|||
" </tr>", |
|||
"{% for i in range(0, 1800, 250) %}", |
|||
" {% set color = colorInterpolate([ '#00ff00', '#0000ff' ], i / 2000) %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td>", |
|||
" <td>{{ i }}mm</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine({ 'width': 3, 'color': '#0000ff' })|raw }}</td>", |
|||
" <td>>2000mm</td>", |
|||
" </tr>", |
|||
"</table>" |
|||
] |
|||
} |
@ -0,0 +1,114 @@ |
|||
type: overpass |
|||
name: |
|||
ca: Ample de via fèrria |
|||
cs: Rozchod železnice |
|||
de: Eisenbahn-Spurweite |
|||
en: Railway gauge |
|||
es: Ancho de vía |
|||
fr: Écartement des rails |
|||
gl: Anchura de vía |
|||
hu: Vasúti nyomtáv |
|||
it: Scartamento Ferroviario |
|||
ja: 軌間 |
|||
nb: Sporvidde |
|||
oc: Ample dei vias |
|||
pl: Rozstaw szyn |
|||
pt: Bitola |
|||
pt-br: Bitola |
|||
ru: Железнодорожная колея |
|||
tr: Demiryolu hat açıklığı |
|||
query: |
|||
11: way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$']; |
|||
14: way[railway~'^(disused|construction|funicular|light_rail|miniature|monorail|narrow_gauge|preserved|rail|subway|tram)$']; |
|||
feature: |
|||
pre: |- |
|||
{% set gauges = tags.gauge|split(';')|sort|reverse %} |
|||
{% set width = max(3, 3 / map.metersPerPixel) %} |
|||
title: '{% if tags.ref %}{{ localizedTag(tags, ''ref'') }} - {% endif %}{{ localizedTag(tags, ''name'')|default(localizedTag(tags, ''operator'')) }}' |
|||
description: '{{ tagTrans(''railway'', tags.railway) }}' |
|||
details: '{{ tags.gauge|default(trans(''unknown''))|enumerate }}' |
|||
body: |- |
|||
{{ tagTrans('railway', tags.railway) }}<br/> |
|||
{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %} |
|||
{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %} |
|||
{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %} |
|||
{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown'))|enumerate }}<br/> |
|||
{% 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 %} |
|||
markerSymbol: null |
|||
listMarkerSymbol: line |
|||
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 %}' |
|||
style: |
|||
width: '{{ width }}' |
|||
pane: casing |
|||
color: '{% if tags.gauge %}{% if not tags.gauge|matches(''^\d+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], tags.gauge / 2000) }}{% endif %}{% else %}#404040{% endif %}' |
|||
style:rail: |
|||
width: '1' |
|||
color: '#ffffff' |
|||
offset: '{{ gauges[0] / -2000 }}m' |
|||
style:gauge0: |
|||
width: '{{ width }}' |
|||
pane: casing |
|||
lineCap: butt |
|||
color: '{% if not gauges[0]|matches(''^[0-9]+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], gauges[0] / 2000) }}{% endif %}' |
|||
dashArray: '5,{{ (gauges|length - 1) * 5 }}' |
|||
style:rail0: |
|||
width: '1' |
|||
color: '#ffffff' |
|||
offset: '{{ gauges[0] / 2000 }}m' |
|||
style:gauge1: |
|||
width: '{{ width }}' |
|||
pane: casing |
|||
lineCap: butt |
|||
color: '{% if not gauges[1]|matches(''^[0-9]+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], gauges[1] / 2000) }}{% endif %}' |
|||
dashArray: '5,{{ (gauges|length - 1) * 5 }}' |
|||
dashOffset: '5' |
|||
style:rail1: |
|||
width: '1' |
|||
color: '#ffffff' |
|||
offset: '{{ gauges[0] / -2000 + gauges[1] / 1000 }}m' |
|||
style:gauge2: |
|||
width: '{{ width }}' |
|||
pane: casing |
|||
lineCap: butt |
|||
color: '{% if not gauges[2]|matches(''^\d+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], gauges[2] / 2000) }}{% endif %}' |
|||
dashArray: '5,{{ (gauges|length - 1) * 5 }}' |
|||
dashOffset: '10' |
|||
style:rail2: |
|||
width: '1' |
|||
color: '#ffffff' |
|||
offset: '{{ gauges[0] / -2000 + gauges[2] / 1000 }}m' |
|||
style:gauge3: |
|||
width: '{{ width }}' |
|||
pane: casing |
|||
lineCap: butt |
|||
color: '{% if not gauges[3]|matches(''^\d+$'') %}#ff0000{% else %}{{ colorInterpolate([ ''#00ff00'', ''#0000ff'' ], gauges[3] / 2000) }}{% endif %}' |
|||
dashArray: '5,{{ (gauges|length - 1) * 5 }}' |
|||
dashOffset: '15' |
|||
style:rail3: |
|||
width: '1' |
|||
color: '#ffffff' |
|||
offset: '{{ gauges[0] / -2000 + gauges[3] / 1000 }}m' |
|||
info: |- |
|||
<table> |
|||
{% set color = '#ff0000' %} |
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td> |
|||
<td>{{ trans('illegal value') }}</td> |
|||
</tr> |
|||
{% set color = '#404040' %} |
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td> |
|||
<td>{{ trans('unknown') }}</td> |
|||
</tr> |
|||
{% for i in range(0, 1800, 250) %} |
|||
{% set color = colorInterpolate([ '#00ff00', '#0000ff' ], i / 2000) %} |
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': color })|raw }}</td> |
|||
<td>{{ i }}mm</td> |
|||
</tr> |
|||
{% endfor %} |
|||
<tr> |
|||
<td>{{ markerLine({ 'width': 3, 'color': '#0000ff' })|raw }}</td> |
|||
<td>>2000mm</td> |
|||
</tr> |
|||
</table> |
@ -1,169 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"ca": "Infraestructura fèrria", |
|||
"cs": "Železniční infrastruktura", |
|||
"de": "Eisenbahn Infrastruktur", |
|||
"en": "Railway infrastructure", |
|||
"es": "Infraestructura ferroviaria", |
|||
"fr": "Infrastructure ferroviaire", |
|||
"gl": "Infraestrutura do ferrocarril", |
|||
"hu": "Vasúti infrastruktúra", |
|||
"it": "Infrastruttura ferroviaria", |
|||
"ja": "鉄道インフラ", |
|||
"nb": "Jernbane-infrastruktur", |
|||
"nl": "Spoorweginfrastructuur", |
|||
"oc": "Infrastructura ferroviària", |
|||
"pl": "Infrastruktura kolejowa", |
|||
"pt": "Infraestrutura ferroviária", |
|||
"pt-br": "Infraestrutura ferroviária", |
|||
"ru": "Железнодорожная инфраструктура", |
|||
"sr": "Железничка инфраструктура", |
|||
"tr": "Demiryolu altyapısı" |
|||
}, |
|||
"query": { |
|||
"11": "(way[railway=rail][usage~'^(main|branch)$'];node[railway~'^(station)$'];)", |
|||
"14": "(way[railway];node[railway~'^(station|halt|tram_stop)$'];)", |
|||
"17": "(node[railway];way[railway];)" |
|||
}, |
|||
"feature": { |
|||
"title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }}", |
|||
"description": [ |
|||
"{{ tagTrans('railway', tags.railway) -}}", |
|||
"{%- if tags.usage %}", |
|||
", {{ tagTrans('railway=rail usage', tags.usage) }}", |
|||
"{% endif -%}", |
|||
"{%- if tags.service %}", |
|||
", {{ tagTrans('railway=rail service', tags.service) }}", |
|||
"{% endif -%}" |
|||
], |
|||
"body": [ |
|||
"{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}", |
|||
"{% if tags.usage %}{{ keyTrans('railway=rail usage') }}: {{ tagTrans('railway=rail usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}", |
|||
"{% if tags.service %}{{ keyTrans('railway=rail service') }}: {{ tagTrans('railway=rail service', tags.service ) }}<br/>{% endif %}", |
|||
"{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>", |
|||
"{% 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 %}" |
|||
], |
|||
"markerSign": "{% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}X{% endif %}", |
|||
"markerSymbol": [ |
|||
"{% if tags.railway == 'signal' %}", |
|||
"<svg anchorX='5' anchorY='8' width='9' height='15'>", |
|||
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #000000; fill-opacity: 1;' />", |
|||
" <circle cx='4.5' cy='4.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #7f7f7f;'/>", |
|||
" <circle cx='4.5' cy='10.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #ff0000;'/>", |
|||
"</svg>", |
|||
"{% elseif tags.railway == 'switch' %}", |
|||
"<svg anchorX='5' anchorY='8' width='9' height='15'>", |
|||
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />", |
|||
" <line x1='2' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>", |
|||
" <line x1='2' x2='7' y1='10' y2='2' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>", |
|||
"</svg>", |
|||
"{% elseif tags.railway == 'railway_crossing' %}", |
|||
"<svg anchorX='5' anchorY='8' width='9' height='15'>", |
|||
" <rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' />", |
|||
" <line x1='2' x2='7' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>", |
|||
" <line x1='7' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/>", |
|||
"</svg>", |
|||
"{% elseif tags.railway not in [ 'rail', 'tram', 'subway', 'narrow_gauge', 'abandoned', 'disused' ] %}", |
|||
"{{ markerPointer({})|raw }}", |
|||
"{% endif %}" |
|||
], |
|||
"listMarkerSymbol": [ |
|||
"{% if tags.railway in [ 'station', 'halt', 'tram_stop', 'stop', 'subway_entrance', 'signal', 'switch', 'railway_crossing' ] %}", |
|||
"{% else %}", |
|||
"line", |
|||
"{% endif %}" |
|||
], |
|||
"priority": [ |
|||
"{% if tags.railway == 'station' %}0", |
|||
"{% elseif tags.railway in [ 'halt' ] %}1", |
|||
"{% elseif tags.railway in [ 'tram_stop', 'stop' ] %}2", |
|||
"{% elseif tags.railway in [ 'subway_entrance' ] %}3", |
|||
"{% else %}5", |
|||
"{% endif %}" |
|||
], |
|||
"styles": "{% if tags.railway == 'narrow_gauge' %}default,casing{% else %}default{% endif %}", |
|||
"style": { |
|||
"width": [ |
|||
"{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %}", |
|||
"1", |
|||
"{% else %}", |
|||
" {% if tags.railway == 'rail' %}", |
|||
" {% if tags.usage == 'main' or tags.usage == 'branch' %}", |
|||
" 3", |
|||
" {% else %}", |
|||
" 2", |
|||
" {% endif %}", |
|||
" {% elseif tags.railway == 'platform' %}", |
|||
" 1", |
|||
" {% elseif tags.railway in [ 'signal', 'switch', 'railway_crossing' ] %}", |
|||
" 0", |
|||
" {% else %}", |
|||
" 2", |
|||
" {% endif %}", |
|||
"{% endif %}" |
|||
], |
|||
"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 %}", |
|||
"opacity": "1", |
|||
"dashArray": "{% if tags.railway == 'rail' %}{% elseif tags.railway == 'disused' %}1,5{% elseif tags.railway == 'abandoned' %}1,7{% endif %}", |
|||
"fill": [ |
|||
"{% if tags.railway == 'platform' %}", |
|||
"1", |
|||
"{% elseif type == 'node' %}", |
|||
"1", |
|||
"{% else %}", |
|||
"{% endif %}" |
|||
], |
|||
"fillColor": [ |
|||
"{% if tags.railway == 'platform' %}", |
|||
"#3f3f3f", |
|||
"{% elseif type == 'node' %}", |
|||
"#ffffff", |
|||
"{% endif %}" |
|||
], |
|||
"fillOpacity": [ |
|||
"{% if tags.railway == 'platform' %}", |
|||
"0.2", |
|||
"{% elseif type == 'node' %}", |
|||
"0", |
|||
"{% endif %}" |
|||
] |
|||
}, |
|||
"style:casing": { |
|||
"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 %}", |
|||
"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 %}", |
|||
"lineCap": "butt", |
|||
"dashArray": "2,4" |
|||
} |
|||
}, |
|||
"info": [ |
|||
"<table>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"railway\": \"rail\", \"usage\": \"main\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"railway\": \"rail\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('railway', 'rail') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"railway\": \"narrow_gauge\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('railway', 'narrow_gauge') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"railway\": \"light_rail\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('railway', 'light_rail') }}</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"railway\": \"subway\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('railway', 'subway') }}</td>", |
|||
" </tr>", |
|||
"{% if map.zoom >= 14 %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"railway\": \"tram\" }))|raw }}</td>", |
|||
" <td>{{ tagTrans('railway', 'tram') }}</td>", |
|||
" </tr>", |
|||
"{% endif %}", |
|||
"</table>" |
|||
] |
|||
} |
@ -0,0 +1,152 @@ |
|||
type: overpass |
|||
name: |
|||
ca: Infraestructura fèrria |
|||
cs: Železniční infrastruktura |
|||
de: Eisenbahn Infrastruktur |
|||
en: Railway infrastructure |
|||
es: Infraestructura ferroviaria |
|||
fr: Infrastructure ferroviaire |
|||
gl: Infraestrutura do ferrocarril |
|||
hu: Vasúti infrastruktúra |
|||
it: Infrastruttura ferroviaria |
|||
ja: 鉄道インフラ |
|||
nb: Jernbane-infrastruktur |
|||
nl: Spoorweginfrastructuur |
|||
oc: Infrastructura ferroviària |
|||
pl: Infrastruktura kolejowa |
|||
pt: Infraestrutura ferroviária |
|||
pt-br: Infraestrutura ferroviária |
|||
ru: Железнодорожная инфраструктура |
|||
sr: Железничка инфраструктура |
|||
tr: Demiryolu altyapısı |
|||
query: |
|||
11: (way[railway=rail][usage~'^(main|branch)$'];node[railway~'^(station)$'];) |
|||
14: (way[railway];node[railway~'^(station|halt|tram_stop)$'];) |
|||
17: (node[railway];way[railway];) |
|||
feature: |
|||
title: '{% if tags.ref %}{{ localizedTag(tags, ''ref'') }} - {% endif %}{{ localizedTag(tags, ''name'')|default(localizedTag(tags, ''operator'')) }}' |
|||
description: |- |
|||
{{ tagTrans('railway', tags.railway) -}} |
|||
{%- if tags.usage %} |
|||
, {{ tagTrans('railway=rail usage', tags.usage) }} |
|||
{% endif -%} |
|||
{%- if tags.service %} |
|||
, {{ tagTrans('railway=rail service', tags.service) }} |
|||
{% endif -%} |
|||
body: |- |
|||
{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %} |
|||
{% if tags.usage %}{{ keyTrans('railway=rail usage') }}: {{ tagTrans('railway=rail usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %} |
|||
{% if tags.service %}{{ keyTrans('railway=rail service') }}: {{ tagTrans('railway=rail service', tags.service ) }}<br/>{% endif %} |
|||
{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/> |
|||
{% 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 %} |
|||
markerSign: '{% if tags.railway in [ ''halt'', ''tram_stop'', ''station'', ''stop'', ''subway_entrance'' ] %}X{% endif %}' |
|||
markerSymbol: |- |
|||
{% if tags.railway == 'signal' %} |
|||
<svg anchorX='5' anchorY='8' width='9' height='15'> |
|||
<rect x='0.5' y='0.5' width='8' height='14' style='fill: #000000; fill-opacity: 1;' /> |
|||
<circle cx='4.5' cy='4.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #7f7f7f;'/> |
|||
<circle cx='4.5' cy='10.5' r='2.5' style='stroke-width: 1; stroke: #000000; fill: #ff0000;'/> |
|||
</svg> |
|||
{% elseif tags.railway == 'switch' %} |
|||
<svg anchorX='5' anchorY='8' width='9' height='15'> |
|||
<rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' /> |
|||
<line x1='2' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/> |
|||
<line x1='2' x2='7' y1='10' y2='2' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/> |
|||
</svg> |
|||
{% elseif tags.railway == 'railway_crossing' %} |
|||
<svg anchorX='5' anchorY='8' width='9' height='15'> |
|||
<rect x='0.5' y='0.5' width='8' height='14' style='fill: #ffffff; fill-opacity: 1;' /> |
|||
<line x1='2' x2='7' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/> |
|||
<line x1='7' x2='2' y1='2' y2='13' style='stroke-width: 2; stroke: #000000; stroke-linecap: round;'/> |
|||
</svg> |
|||
{% elseif tags.railway not in [ 'rail', 'tram', 'subway', 'narrow_gauge', 'abandoned', 'disused' ] %} |
|||
{{ markerPointer({})|raw }} |
|||
{% endif %} |
|||
listMarkerSymbol: |- |
|||
{% if tags.railway in [ 'station', 'halt', 'tram_stop', 'stop', 'subway_entrance', 'signal', 'switch', 'railway_crossing' ] %} |
|||
{% else %} |
|||
line |
|||
{% endif %} |
|||
priority: |- |
|||
{% if tags.railway == 'station' %}0 |
|||
{% elseif tags.railway in [ 'halt' ] %}1 |
|||
{% elseif tags.railway in [ 'tram_stop', 'stop' ] %}2 |
|||
{% elseif tags.railway in [ 'subway_entrance' ] %}3 |
|||
{% else %}5 |
|||
{% endif %} |
|||
styles: '{% if tags.railway == ''narrow_gauge'' %}default,casing{% else %}default{% endif %}' |
|||
style: |
|||
width: |- |
|||
{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %} |
|||
1 |
|||
{% else %} |
|||
{% if tags.railway == 'rail' %} |
|||
{% if tags.usage == 'main' or tags.usage == 'branch' %} |
|||
3 |
|||
{% else %} |
|||
2 |
|||
{% endif %} |
|||
{% elseif tags.railway == 'platform' %} |
|||
1 |
|||
{% elseif tags.railway in [ 'signal', 'switch', 'railway_crossing' ] %} |
|||
0 |
|||
{% else %} |
|||
2 |
|||
{% endif %} |
|||
{% endif %} |
|||
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 %}' |
|||
opacity: '1' |
|||
dashArray: '{% if tags.railway == ''rail'' %}{% elseif tags.railway == ''disused'' %}1,5{% elseif tags.railway == ''abandoned'' %}1,7{% endif %}' |
|||
fill: |- |
|||
{% if tags.railway == 'platform' %} |
|||
1 |
|||
{% elseif type == 'node' %} |
|||
1 |
|||
{% else %} |
|||
{% endif %} |
|||
fillColor: |- |
|||
{% if tags.railway == 'platform' %} |
|||
#3f3f3f |
|||
{% elseif type == 'node' %} |
|||
#ffffff |
|||
{% endif %} |
|||
fillOpacity: |- |
|||
{% if tags.railway == 'platform' %} |
|||
0.2 |
|||
{% elseif type == 'node' %} |
|||
0 |
|||
{% endif %} |
|||
style:casing: |
|||
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 %}' |
|||
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 %}' |
|||
lineCap: butt |
|||
dashArray: '2,4' |
|||
info: |- |
|||
<table> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "railway": "rail", "usage": "main" }))|raw }}</td> |
|||
<td>{{ tagTrans('railway', 'rail') }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', 'main') }}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "railway": "rail" }))|raw }}</td> |
|||
<td>{{ tagTrans('railway', 'rail') }}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "railway": "narrow_gauge" }))|raw }}</td> |
|||
<td>{{ tagTrans('railway', 'narrow_gauge') }}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "railway": "light_rail" }))|raw }}</td> |
|||
<td>{{ tagTrans('railway', 'light_rail') }}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "railway": "subway" }))|raw }}</td> |
|||
<td>{{ tagTrans('railway', 'subway') }}</td> |
|||
</tr> |
|||
{% if map.zoom >= 14 %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "railway": "tram" }))|raw }}</td> |
|||
<td>{{ tagTrans('railway', 'tram') }}</td> |
|||
</tr> |
|||
{% endif %} |
|||
</table> |
@ -1,178 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"ca": "Velocitat màxima de la via fèrria", |
|||
"cs": "Maximální rychlost železnice", |
|||
"de": "Eisenbahn Höchstgeschwindigkeiten", |
|||
"en": "Railway Maxspeed", |
|||
"es": "Velocidad máxima del ferrocarril", |
|||
"fr": "Limites de vitesse", |
|||
"gl": "Velocidade máxima do ferrocarril", |
|||
"hu": "Sebességkorlátozás", |
|||
"it": "Velocità ferroviaria massima", |
|||
"ja": "鉄道の最高速度", |
|||
"nb": "Jernbane-fartsgrense", |
|||
"nl": "Spoorweg snelheidslimiet", |
|||
"oc": "Limits de velocitat", |
|||
"pl": "Prędkość maksymalna kolei", |
|||
"pt": "Velocidade máxima", |
|||
"pt-br": "Velocidade máxima", |
|||
"ru": "Максимальная скорость", |
|||
"tr": "Demiryolu Maksimum Hızı" |
|||
}, |
|||
"query": { |
|||
"11": "way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$'];", |
|||
"14": "way[railway~'^(disused|construction|funicular|light_rail|miniature|monorail|narrow_gauge|preserved|rail|subway|tram)$'];" |
|||
}, |
|||
"feature": { |
|||
"pre": [ |
|||
"{% set maxspeedKmh = null %}", |
|||
"{% set maxspeed = null %}", |
|||
"{% set unit = null %}", |
|||
"", |
|||
"{% if tags.maxspeed is defined %}", |
|||
" {% if tags.maxspeed|matches(\"^[0-9]+$\") %}", |
|||
" {% set maxspeedKmh = tags.maxspeed %}", |
|||
" {% set maxspeed = tags.maxspeed %}", |
|||
" {% set unit = \"km/h\" %}", |
|||
" {% elseif tags.maxspeed|matches( \"(^[0-9]+) mph$\") %}", |
|||
" {% set m = tags.maxspeed|matches(\"(^[0-9]+) mph$\") %}", |
|||
" {% set maxspeedKmh = m[1] * 1.60934 %}", |
|||
" {% set maxspeed = m[1] %}", |
|||
" {% set unit = \"mph\" %}", |
|||
" {% endif %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if attribute(tags, 'maxspeed:forward') is defined %}", |
|||
" {% if attribute(tags, 'maxspeed:forward')|matches(\"^[0-9]+$\") %}", |
|||
" {% set maxspeedFKmh = attribute(tags, 'maxspeed:forward') %}", |
|||
" {% set maxspeedF = attribute(tags, 'maxspeed:forward') %}", |
|||
" {% set unit = \"km/h\" %}", |
|||
" {% elseif attribute(tags, 'maxspeed:forward')|matches(\"^[0-9]+ mph$\") %}", |
|||
" {% set m = attribute(tags, 'maxspeed:forward')|matches(\"(^[0-9]+) mph$\") %}", |
|||
" {% set maxspeedFKmh = m[1] * 1.60934 %}", |
|||
" {% set maxspeedF = m[1] %}", |
|||
" {% set unit = \"mph\" %}", |
|||
" {% endif %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if attribute(tags, 'maxspeed:backward') is defined %}", |
|||
" {% if attribute(tags, 'maxspeed:backward')|matches(\"^[0-9]+$\") %}", |
|||
" {% set maxspeedBKmh = attribute(tags, 'maxspeed:backward') %}", |
|||
" {% set maxspeedB = attribute(tags, 'maxspeed:backward') %}", |
|||
" {% set unit = \"km/h\" %}", |
|||
" {% elseif attribute(tags, 'maxspeed:backward')|matches(\"^[0-9]+ mph$\") %}", |
|||
" {% set m = attribute(tags, 'maxspeed:backward')|matches(\"(^[0-9]+) mph$\") %}", |
|||
" {% set maxspeedBKmh = m[1] * 1.60934 %}", |
|||
" {% set maxspeedB = m[1] %}", |
|||
" {% set unit = \"mph\" %}", |
|||
" {% endif %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if not maxspeedKmh %}", |
|||
"{% set color = \"#404040\" %}", |
|||
"{% else %}", |
|||
"{% set color = colorInterpolate(const.colorMap, (maxspeedKmh - const.offsetColorSpeed) / const.highestColorSpeed) %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if maxspeedFKmh %}", |
|||
"{% set colorF = colorInterpolate(const.colorMap, (maxspeedFKmh - const.offsetColorSpeed) / const.highestColorSpeed) %}", |
|||
"{% endif %}", |
|||
"", |
|||
"{% if maxspeedBKmh %}", |
|||
"{% set colorB = colorInterpolate(const.colorMap, (maxspeedBKmh - const.offsetColorSpeed) / const.highestColorSpeed) %}", |
|||
"{% endif %}" |
|||
], |
|||
"description": [ |
|||
"{% if maxspeedF or maxspeedB %}", |
|||
"<span style='color: {{ colorB }}'>{{ maxspeedB|default(trans('unknown')) }}</span> / <span style='color: {{ colorF }}'>{{ maxspeedF|default(trans('unknown')) }}</span> {{ unit }}", |
|||
"{% elseif maxspeed %}", |
|||
"<span style='color: {{ color }}'>{{ maxspeed }} {{ unit }}</span>", |
|||
"{% elseif tags.maxspeed %}", |
|||
"{{ tags.maxspeed }}", |
|||
"{% else %}", |
|||
"{{ trans('unknown') }}", |
|||
"{% endif %}" |
|||
], |
|||
"markerSymbol": null, |
|||
"listMarkerSymbol": "line", |
|||
"styles": "{% if maxspeedB or maxspeedF %}left,right,default{% else %}default{% endif %}", |
|||
"style": { |
|||
"width": "{% if maxspeedB or maxspeedF %}0{% else %}4{% endif %}", |
|||
"color": "{{ color }}", |
|||
"text": [ |
|||
"{% if maxspeedB or maxspeedF %}", |
|||
" {% if maxspeedB %}🡸 {{ maxspeedB }} {% endif %}|{% if maxspeedF %} {{ maxspeedF }} 🡺{% endif %} ", |
|||
"{% else %}", |
|||
" {{ maxspeed }} ", |
|||
"{% endif %}" |
|||
], |
|||
"textRepeat": "1", |
|||
"textOffset": "4", |
|||
"textFontWeight": "bold" |
|||
}, |
|||
"style:left": { |
|||
"width": "2", |
|||
"color": "{{ colorB|default('#404040') }}", |
|||
"offset": "-1" |
|||
}, |
|||
"style:right": { |
|||
"width": "2", |
|||
"color": "{{ colorF|default('#404040') }}", |
|||
"offset": "1" |
|||
} |
|||
}, |
|||
"const": { |
|||
"colorMap": [ |
|||
"#00af00", |
|||
"#ff7f00", |
|||
"#ff0000", |
|||
"#af00af" |
|||
], |
|||
"highestColorSpeed": 300, |
|||
"offsetColorSpeed": 20 |
|||
}, |
|||
"info": [ |
|||
"<div style='display: inline-block'>", |
|||
"<table>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({}))|raw }}</td>", |
|||
" <td colspan>{{ trans('unknown') }}</td>", |
|||
" </tr>", |
|||
"{% for i in range(25, 280, 25) %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": i }))|raw }}</td>", |
|||
" <td>{{ i }}km/h</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": 300 }))|raw }}</td>", |
|||
" <td>≥300km/h</td>", |
|||
" </tr>", |
|||
"</table>", |
|||
"</div>", |
|||
"", |
|||
"<div style='display: inline-block'>", |
|||
"<table>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({}))|raw }}</td>", |
|||
" <td colspan>{{ trans('unknown') }}</td>", |
|||
" </tr>", |
|||
"{% for i in range(15, 150, 15) %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": (i * 1.60934)|round }))|raw }}</td>", |
|||
" <td>{{ i }}mph</td>", |
|||
" </tr>", |
|||
"{% endfor %}", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": (175 * 1.60934)|round }))|raw }}</td>", |
|||
" <td>175mph</td>", |
|||
" </tr>", |
|||
" <tr>", |
|||
" <td>{{ markerLine(evaluate({ \"maxspeed\": (200 * 1.60934)|round }))|raw }}</td>", |
|||
" <td>≥200mph</td>", |
|||
" </tr>", |
|||
"</table>", |
|||
"</div>" |
|||
] |
|||
} |
@ -0,0 +1,164 @@ |
|||
type: overpass |
|||
name: |
|||
ca: Velocitat màxima de la via fèrria |
|||
cs: Maximální rychlost železnice |
|||
de: Eisenbahn Höchstgeschwindigkeiten |
|||
en: Railway Maxspeed |
|||
es: Velocidad máxima del ferrocarril |
|||
fr: Limites de vitesse |
|||
gl: Velocidade máxima do ferrocarril |
|||
hu: Sebességkorlátozás |
|||
it: Velocità ferroviaria massima |
|||
ja: 鉄道の最高速度 |
|||
nb: Jernbane-fartsgrense |
|||
nl: Spoorweg snelheidslimiet |
|||
oc: Limits de velocitat |
|||
pl: Prędkość maksymalna kolei |
|||
pt: Velocidade máxima |
|||
pt-br: Velocidade máxima |
|||
ru: Максимальная скорость |
|||
tr: Demiryolu Maksimum Hızı |
|||
query: |
|||
11: way[railway=rail][railway!~'^(platform|abandoned|disused|station|proposed|subway_entrance)$'][usage~'^(main|branch)$']; |
|||
14: way[railway~'^(disused|construction|funicular|light_rail|miniature|monorail|narrow_gauge|preserved|rail|subway|tram)$']; |
|||
feature: |
|||
pre: |- |
|||
{% set maxspeedKmh = null %} |
|||
{% set maxspeed = null %} |
|||
{% set unit = null %} |
|||
|
|||
{% if tags.maxspeed is defined %} |
|||
{% if tags.maxspeed|matches("^[0-9]+$") %} |
|||
{% set maxspeedKmh = tags.maxspeed %} |
|||
{% set maxspeed = tags.maxspeed %} |
|||
{% set unit = "km/h" %} |
|||
{% elseif tags.maxspeed|matches( "(^[0-9]+) mph$") %} |
|||
{% set m = tags.maxspeed|matches("(^[0-9]+) mph$") %} |
|||
{% set maxspeedKmh = m[1] * 1.60934 %} |
|||
{% set maxspeed = m[1] %} |
|||
{% set unit = "mph" %} |
|||
{% endif %} |
|||
{% endif %} |
|||
|
|||
{% if attribute(tags, 'maxspeed:forward') is defined %} |
|||
{% if attribute(tags, 'maxspeed:forward')|matches("^[0-9]+$") %} |
|||
{% set maxspeedFKmh = attribute(tags, 'maxspeed:forward') %} |
|||
{% set maxspeedF = attribute(tags, 'maxspeed:forward') %} |
|||
{% set unit = "km/h" %} |
|||
{% elseif attribute(tags, 'maxspeed:forward')|matches("^[0-9]+ mph$") %} |
|||
{% set m = attribute(tags, 'maxspeed:forward')|matches("(^[0-9]+) mph$") %} |
|||
{% set maxspeedFKmh = m[1] * 1.60934 %} |
|||
{% set maxspeedF = m[1] %} |
|||
{% set unit = "mph" %} |
|||
{% endif %} |
|||
{% endif %} |
|||
|
|||
{% if attribute(tags, 'maxspeed:backward') is defined %} |
|||
{% if attribute(tags, 'maxspeed:backward')|matches("^[0-9]+$") %} |
|||
{% set maxspeedBKmh = attribute(tags, 'maxspeed:backward') %} |
|||
{% set maxspeedB = attribute(tags, 'maxspeed:backward') %} |
|||
{% set unit = "km/h" %} |
|||
{% elseif attribute(tags, 'maxspeed:backward')|matches("^[0-9]+ mph$") %} |
|||
{% set m = attribute(tags, 'maxspeed:backward')|matches("(^[0-9]+) mph$") %} |
|||
{% set maxspeedBKmh = m[1] * 1.60934 %} |
|||
{% set maxspeedB = m[1] %} |
|||
{% set unit = "mph" %} |
|||
{% endif %} |
|||
{% endif %} |
|||
|
|||
{% if not maxspeedKmh %} |
|||
{% set color = "#404040" %} |
|||
{% else %} |
|||
{% set color = colorInterpolate(const.colorMap, (maxspeedKmh - const.offsetColorSpeed) / const.highestColorSpeed) %} |
|||
{% endif %} |
|||
|
|||
{% if maxspeedFKmh %} |
|||
{% set colorF = colorInterpolate(const.colorMap, (maxspeedFKmh - const.offsetColorSpeed) / const.highestColorSpeed) %} |
|||
{% endif %} |
|||
|
|||
{% if maxspeedBKmh %} |
|||
{% set colorB = colorInterpolate(const.colorMap, (maxspeedBKmh - const.offsetColorSpeed) / const.highestColorSpeed) %} |
|||
{% endif %} |
|||
description: |- |
|||
{% if maxspeedF or maxspeedB %} |
|||
<span style='color: {{ colorB }}'>{{ maxspeedB|default(trans('unknown')) }}</span> / <span style='color: {{ colorF }}'>{{ maxspeedF|default(trans('unknown')) }}</span> {{ unit }} |
|||
{% elseif maxspeed %} |
|||
<span style='color: {{ color }}'>{{ maxspeed }} {{ unit }}</span> |
|||
{% elseif tags.maxspeed %} |
|||
{{ tags.maxspeed }} |
|||
{% else %} |
|||
{{ trans('unknown') }} |
|||
{% endif %} |
|||
markerSymbol: null |
|||
listMarkerSymbol: line |
|||
styles: '{% if maxspeedB or maxspeedF %}left,right,default{% else %}default{% endif %}' |
|||
style: |
|||
width: '{% if maxspeedB or maxspeedF %}0{% else %}4{% endif %}' |
|||
color: '{{ color }}' |
|||
text: |- |
|||
{% if maxspeedB or maxspeedF %} |
|||
{% if maxspeedB %}🡸 {{ maxspeedB }} {% endif %}|{% if maxspeedF %} {{ maxspeedF }} 🡺{% endif %} |
|||
{% else %} |
|||
{{ maxspeed }} |
|||
{% endif %} |
|||
textRepeat: '1' |
|||
textOffset: '4' |
|||
textFontWeight: bold |
|||
style:left: |
|||
width: '2' |
|||
color: '{{ colorB|default(''#404040'') }}' |
|||
offset: '-1' |
|||
style:right: |
|||
width: '2' |
|||
color: '{{ colorF|default(''#404040'') }}' |
|||
offset: '1' |
|||
const: |
|||
colorMap: |
|||
- '#00af00' |
|||
- '#ff7f00' |
|||
- '#ff0000' |
|||
- '#af00af' |
|||
highestColorSpeed: 300 |
|||
offsetColorSpeed: 20 |
|||
info: |- |
|||
<div style='display: inline-block'> |
|||
<table> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({}))|raw }}</td> |
|||
<td colspan>{{ trans('unknown') }}</td> |
|||
</tr> |
|||
{% for i in range(25, 280, 25) %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": i }))|raw }}</td> |
|||
<td>{{ i }}km/h</td> |
|||
</tr> |
|||
{% endfor %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": 300 }))|raw }}</td> |
|||
<td>≥300km/h</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
|
|||
<div style='display: inline-block'> |
|||
<table> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({}))|raw }}</td> |
|||
<td colspan>{{ trans('unknown') }}</td> |
|||
</tr> |
|||
{% for i in range(15, 150, 15) %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": (i * 1.60934)|round }))|raw }}</td> |
|||
<td>{{ i }}mph</td> |
|||
</tr> |
|||
{% endfor %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": (175 * 1.60934)|round }))|raw }}</td> |
|||
<td>175mph</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "maxspeed": (200 * 1.60934)|round }))|raw }}</td> |
|||
<td>≥200mph</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
@ -1,75 +0,0 @@ |
|||
{ |
|||
"type": "overpass", |
|||
"name": { |
|||
"ca": "Rutes Fèrries", |
|||
"cs": "Železniční trasy", |
|||
"de": "Eisenbahnrouten", |
|||
"en": "Railway Routes", |
|||
"es": "Rutas de ferrocarril", |
|||
"fr": "Lignes ferroviaires", |
|||
"gl": "Liñas de ferrocarril", |
|||
"hu": "Vasútvonalak", |
|||
"it": "Percorsi ferroviari", |
|||
"ja": "鉄道ルート", |
|||
"nb": "Jernbaneruter", |
|||
"nl": "Spoorwegroutes", |
|||
"oc": "Linhas ferroviàrias", |
|||
"pl": "Trasy kolejowe", |
|||
"pt": "Rotas ferroviárias", |
|||
"pt-br": "Rotas ferroviárias", |
|||
"ru": "Железнодорожные маршруты", |
|||
"sr": "Трасе железнице", |
|||
"tr": "Demiryolu Güzergahları" |
|||
}, |
|||
"query": { |
|||
"12": "relation[type=route][route=railway]" |
|||
}, |
|||
"members": true, |
|||
"feature": { |
|||
"pre": "{% set color = '#' ~ tags.operator|default('')|md5|slice(0, 6) %}", |
|||
"listMarkerSymbol": "{{ markerLine({ 'width': 4, 'color': color })|raw }}", |
|||
"description": "{{ tags.operator }}", |
|||
"title": "{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}", |
|||
"styles": "", |
|||
"markerSymbol": "" |
|||
}, |
|||
"memberFeature": { |
|||
"pre": [ |
|||
"{% set refs = [] %}", |
|||
"{% set color = '#d41d8c' %}", |
|||
"", |
|||
"{% for master in masters %}", |
|||
" {% if master.tags.operator %}", |
|||
" {% set color = '#' ~ master.tags.operator|md5|slice(0, 6) %}", |
|||
" {% endif %}", |
|||
" {% if master.tags.ref %}", |
|||
" {% set refs = refs|merge([ master.tags.ref ]) %}", |
|||
" {% endif %}", |
|||
"{% endfor %}" |
|||
], |
|||
"title": "", |
|||
"body": [ |
|||
"<h4>Routes</h4>", |
|||
"<ul>", |
|||
"{% for master in masters %}", |
|||
" {% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %}", |
|||
" <li data-object=\"{{ master.id }}\" style='list-style: none;'>", |
|||
" <span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span>", |
|||
" <span class='title'>{% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}</span>", |
|||
" <span class='description'>{{ master.tags.operator }}</span>", |
|||
" </li>", |
|||
"{% endfor %}", |
|||
"</ul>" |
|||
], |
|||
"listExclude": "1", |
|||
"style": { |
|||
"color": "{{ color }}", |
|||
"width": 4, |
|||
"opacity": 1, |
|||
"text": "{{ refs|join(' · ') }} ", |
|||
"textRepeat": "1", |
|||
"textOffset": "12", |
|||
"textFontWeight": "bold" |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,66 @@ |
|||
type: overpass |
|||
name: |
|||
ca: Rutes Fèrries |
|||
cs: Železniční trasy |
|||
de: Eisenbahnrouten |
|||
en: Railway Routes |
|||
es: Rutas de ferrocarril |
|||
fr: Lignes ferroviaires |
|||
gl: Liñas de ferrocarril |
|||
hu: Vasútvonalak |
|||
it: Percorsi ferroviari |
|||
ja: 鉄道ルート |
|||
nb: Jernbaneruter |
|||
nl: Spoorwegroutes |
|||
oc: Linhas ferroviàrias |
|||
pl: Trasy kolejowe |
|||
pt: Rotas ferroviárias |
|||
pt-br: Rotas ferroviárias |
|||
ru: Железнодорожные маршруты |
|||
sr: Трасе железнице |
|||
tr: Demiryolu Güzergahları |
|||
query: |
|||
12: relation[type=route][route=railway] |
|||
members: true |
|||
feature: |
|||
pre: '{% set color = ''#'' ~ tags.operator|default('''')|md5|slice(0, 6) %}' |
|||
listMarkerSymbol: '{{ markerLine({ ''width'': 4, ''color'': color })|raw }}' |
|||
description: '{{ tags.operator }}' |
|||
title: '{% if tags.ref and tags.name %}{{ tags.ref }} - {{ tags.name }}{% elseif tags.ref %}{{ tags.ref }}{% elseif tags.name %}{{ tags.name }}{% endif %}' |
|||
styles: '' |
|||
markerSymbol: '' |
|||
memberFeature: |
|||
pre: |- |
|||
{% set refs = [] %} |
|||
{% set color = '#d41d8c' %} |
|||
|
|||
{% for master in masters %} |
|||
{% if master.tags.operator %} |
|||
{% set color = '#' ~ master.tags.operator|md5|slice(0, 6) %} |
|||
{% endif %} |
|||
{% if master.tags.ref %} |
|||
{% set refs = refs|merge([ master.tags.ref ]) %} |
|||
{% endif %} |
|||
{% endfor %} |
|||
title: '' |
|||
body: |- |
|||
<h4>Routes</h4> |
|||
<ul> |
|||
{% for master in masters %} |
|||
{% set _color = '#' ~ master.tags.operator|default('')|md5|slice(0, 6) %} |
|||
<li data-object="{{ master.id }}" style='list-style: none;'> |
|||
<span class='markerParent'><div class='marker'>{{ markerLine({ width: 4, color: _color })|raw }}</div></span> |
|||
<span class='title'>{% if master.tags.ref and master.tags.name %}{{ master.tags.ref }} - {{ master.tags.name|default(master.tags.ref) }}{% elseif master.tags.ref %}{{ master.tags.ref }}{% elseif master.tags.name %}{{ master.tags.name }}{% else %}{{ trans('unnamed') }}{% endif %}</span> |
|||
<span class='description'>{{ master.tags.operator }}</span> |
|||
</li> |
|||
{% endfor %} |
|||
</ul> |
|||
listExclude: '1' |
|||
style: |
|||
color: '{{ color }}' |
|||
width: 4 |
|||
opacity: 1 |
|||
text: '{{ refs|join('' · '') }} ' |
|||
textRepeat: '1' |
|||
textOffset: '12' |
|||
textFontWeight: bold |
Write
Preview
Loading…
Cancel
Save
Reference in new issue