diff --git a/index.json b/index.json
index 2cce7f475..aab4ede1e 100644
--- a/index.json
+++ b/index.json
@@ -74,6 +74,9 @@
{
"id": "power"
},
+ {
+ "id": "railway"
+ },
{
"id": "works"
}
diff --git a/railway.json b/railway.json
new file mode 100644
index 000000000..517abd51d
--- /dev/null
+++ b/railway.json
@@ -0,0 +1,25 @@
+{
+ "type": "overpass",
+ "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];)"
+ },
+ "minZoom": 11,
+ "feature": {
+ "style": {
+ "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 == 'platform' %}#3f3f3f{% else %}#000000{% endif %}",
+ "weight": "{% 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{% else %}2{% endif %}{% endif %}",
+ "dashArray": "{% if tags.railway == 'rail' %}{% elseif tags.railway == 'disused' %}1,5{% elseif tags.railway == 'abandoned' %}1,7{% endif %}",
+ "fillColor": "{% if tags.railway == 'platform' %}#3f3f3f{% endif %}",
+ "fill": "{% if tags.railway == 'platform' %}1{% else %}{% endif %}",
+ "opacity": 1.0
+ },
+ "markerSign": "",
+ "body": "{{ tagTrans('railway', tags.railway) }}
\n{% if tags.operator %}{{ tagTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
{% endif %}\n{% if tags.usage %}{{ tagTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}
{% endif %}\n{% if tags.service %}{{ tagTrans('service') }}: {{ tagTrans('service', tags.service ) }}
{% endif %}\n{{ tagTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}
\n{% if tags.electrified == 'no' %}{{ tagTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ tagTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ tagTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ tagTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}
{% endif %}\n",
+ "description": "{{ tagTrans('railway', tags.railway) }}",
+ "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')) }}"
+ }
+}
+