Compare commits
merge into: OpenStreetBrowser:master
OpenStreetBrowser:aboriginal_lands
OpenStreetBrowser:bug-43
OpenStreetBrowser:buildings
OpenStreetBrowser:climbing
OpenStreetBrowser:cycle_infrastructure
OpenStreetBrowser:cycleway
OpenStreetBrowser:filter
OpenStreetBrowser:fitness_trail
OpenStreetBrowser:fossil
OpenStreetBrowser:heritage
OpenStreetBrowser:leisure-restruct
OpenStreetBrowser:master
OpenStreetBrowser:maxspeed
OpenStreetBrowser:office
OpenStreetBrowser:osm-qa
OpenStreetBrowser:parking-lanes
OpenStreetBrowser:pattern
OpenStreetBrowser:pedestrian
OpenStreetBrowser:places
OpenStreetBrowser:pt
OpenStreetBrowser:railway-electrification
OpenStreetBrowser:railway-rails
OpenStreetBrowser:shop-bulk_purchase
OpenStreetBrowser:sidewalks-category
pull from: OpenStreetBrowser:railway-rails
OpenStreetBrowser:aboriginal_lands
OpenStreetBrowser:bug-43
OpenStreetBrowser:buildings
OpenStreetBrowser:climbing
OpenStreetBrowser:cycle_infrastructure
OpenStreetBrowser:cycleway
OpenStreetBrowser:filter
OpenStreetBrowser:fitness_trail
OpenStreetBrowser:fossil
OpenStreetBrowser:heritage
OpenStreetBrowser:leisure-restruct
OpenStreetBrowser:master
OpenStreetBrowser:maxspeed
OpenStreetBrowser:office
OpenStreetBrowser:osm-qa
OpenStreetBrowser:parking-lanes
OpenStreetBrowser:pattern
OpenStreetBrowser:pedestrian
OpenStreetBrowser:places
OpenStreetBrowser:pt
OpenStreetBrowser:railway-electrification
OpenStreetBrowser:railway-rails
OpenStreetBrowser:shop-bulk_purchase
OpenStreetBrowser:sidewalks-category
12 Commits
master
...
railway-ra
3 changed files with 243 additions and 1 deletions
-
3index.json
-
4lang/en.json
-
237railway-rails.yaml
@ -0,0 +1,237 @@ |
|||
type: overpass |
|||
query: |
|||
11: |- |
|||
( |
|||
way[railway~"^(rail|narrow_gauge|subway|light_rail|monorail)$"][usage~'^(main|branch)$']; |
|||
way[railway~"^(construction|proposed|abandoned|disused|razed)$"][~"^(construction|proposed|abandoned|disused|razed)$"~"^(rail|narrow_gauge|subway|light_rail|monorail)$"][usage~'^(main|branch)$']; |
|||
way[railway~"^(construction|proposed|abandoned|disused|razed)$"][~"^railway:(construction|proposed|abandoned|disused|razed)$"~"^(rail|narrow_gauge|subway|light_rail|monorail)$"][usage~'^(main|branch)$']; |
|||
) |
|||
13: way[railway~"^(rail|narrow_gauge|funicular|monorail|narrow_gauge|subway|light_rail|tram|construction|proposed|abandoned|disused|razed)$"][!service]; |
|||
15: way[railway~"^(rail|narrow_gauge|funicular|monorail|narrow_gauge|subway|light_rail|tram|construction|proposed|abandoned|disused|razed)$"]; |
|||
feature: |
|||
pre: |- |
|||
{% set type = tags.railway %} |
|||
{% set lifecycle = 'active' %} |
|||
{% if tags.railway in ['abandoned', 'construction', 'proposed', 'disused', 'razed'] %} |
|||
{% set lifecycle = tags.railway %} |
|||
{% set type = attribute(tags, tags.railway)|default(attribute(tags, tags.railway ~ ':railway'))|default('unknown') %} |
|||
{% endif %} |
|||
|
|||
{% set color = const.types[type ~ '/' ~ tags.usage].color|default(const.types[type].color)|default(const.types.unknown.color) %} |
|||
|
|||
{% if tags.tunnel and tags.tunnel != 'no' %} |
|||
{% set color = colorInterpolate([ color, '#ffffff' ], 0.3) %} |
|||
{% endif %} |
|||
|
|||
{% set width = 2 %} |
|||
{% if tags.service == 'yard' or tags.service == 'siding' or tags.service == 'spur' or tags.service == 'crossover' %} |
|||
{% set width = 1 %} |
|||
{% elseif tags.railway in ['rail', 'narrow_gauge', 'abandoned', 'disused', 'razed'] %} |
|||
{% if tags.usage in ['main', 'branch'] %} |
|||
{% set width = 3 %} |
|||
{% else %} |
|||
{% set width = 2 %} |
|||
{% endif %} |
|||
{% endif %} |
|||
title: |- |
|||
{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %} |
|||
{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator')) }} |
|||
|
|||
{% if attribute(tags, 'tunnel:name') %}- {{ localizedTag(tags, 'tunnel:name') }}{% endif %} |
|||
{% if attribute(tags, 'bridge:name') %}- {{ localizedTag(tags, 'bridge:name') }}{% endif %} |
|||
description: |- |
|||
{{ tagTrans('railway', type) }} |
|||
{% if lifecycle != 'active' %} |
|||
({{ tagTrans('railway', lifecycle) }}) |
|||
{%- endif -%} |
|||
{%- 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')) }} |
|||
{% endif %}<br/> |
|||
markerSign: |- |
|||
{% if tags.railway in [ 'halt', 'tram_stop', 'station', 'stop', 'subway_entrance' ] %}X |
|||
{% endif %} |
|||
markerSymbol: false |
|||
listMarkerSymbol: line |
|||
styles: |- |
|||
{% if tags.bridge and tags.bridge != 'no' %}casing_bridge,{% endif %} |
|||
casing_back,casing_layer, |
|||
{% if lifecycle != 'active' %}background,{% endif %} |
|||
{% if tags.railway == 'narrow_gauge' %}default,narrow |
|||
{% else %}default |
|||
{% endif %} |
|||
style: |
|||
width: |- |
|||
{{ width }} |
|||
zIndex: |- |
|||
{{ tags.layer|default(0) }} |
|||
color: |- |
|||
{{ color }} |
|||
opacity: 1 |
|||
lineCap: |- |
|||
{{ lifecycle == 'active' ? 'round' : 'butt' }} |
|||
dashArray: |- |
|||
{{ const.lifecycle[lifecycle].dashArray }} |
|||
fill: false |
|||
|
|||
style:background: |
|||
width: |- |
|||
{{ width }} |
|||
zIndex: |- |
|||
{{ tags.layer|default(0) - 0.1 }} |
|||
color: white |
|||
opacity: 1 |
|||
fill: false |
|||
|
|||
style:casing_back: |
|||
color: '#ffffff' |
|||
pane: casing |
|||
width: |- |
|||
{{ width + 2 }} |
|||
|
|||
style:casing_layer: |
|||
color: '#ffffff' |
|||
zIndex: |- |
|||
{{ tags.layer|default(0) - 0.2 }} |
|||
width: |- |
|||
{{ width + 2 }} |
|||
lineCap: butt |
|||
|
|||
style:casing_bridge: |
|||
color: '#000000' |
|||
zIndex: |- |
|||
{{ tags.layer|default(0) - 0.3 }} |
|||
width: |- |
|||
{{ width + 4 }} |
|||
lineCap: butt |
|||
|
|||
style:narrow: |
|||
width: |- |
|||
{{ width + 2 }} |
|||
zIndex: |- |
|||
{{ tags.layer|default(0) }} |
|||
color: |- |
|||
{{ color }} |
|||
lineCap: butt |
|||
dashArray: '2,4' |
|||
|
|||
info: |- |
|||
<table> |
|||
{% for k, v in const.types %} |
|||
{% if not v.hideInfo %} |
|||
{% set railway_usage = k|split('/') %} |
|||
{% if railway_usage|length == 2 %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ 'railway': railway_usage[0], 'usage': railway_usage[1] }))|raw }}</td> |
|||
<td>{{ tagTrans('railway', railway_usage[0]) }}, {{ keyTrans('usage') }}: {{ tagTrans('usage', railway_usage[1]) }}</td> |
|||
</tr> |
|||
{% else %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ "railway": k }))|raw }}</td> |
|||
<td> |
|||
{% if v.title %} |
|||
{{ trans(v.title) }} |
|||
{% else %} |
|||
{{ tagTrans('railway', k) }} |
|||
{% endif %} |
|||
</td> |
|||
</tr> |
|||
{% endif %} |
|||
{% endif %} |
|||
{% endfor %} |
|||
|
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ 'railway': 'rail', 'tunnel': 'yes'}))|raw }}</td> |
|||
<td>{{ keyTrans('tunnel') }}</td> |
|||
</tr> |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ 'railway': 'rail', 'bridge': 'yes'}))|raw }}</td> |
|||
<td>{{ keyTrans('bridge') }}</td> |
|||
</tr> |
|||
|
|||
{% for k, v in const.lifecycle %} |
|||
{% if not v.hideInfo %} |
|||
<tr> |
|||
<td>{{ markerLine(evaluate({ 'railway': k, (k): 'rail'}))|raw }}</td> |
|||
<td>{{ tagTrans('railway', k) }}</td> |
|||
</tr> |
|||
{% endif %} |
|||
{% endfor %} |
|||
</table> |
|||
filter: |
|||
type: |
|||
name: |- |
|||
{{ trans('filter:type') }} |
|||
show_default: true |
|||
type: select |
|||
values: |- |
|||
{% for k, v in const.types %} |
|||
{% set railway_usage = k|split('/') %} |
|||
{% if railway_usage|length == 2 %} |
|||
<option value="{{ k }}" query="(way[railway={{ railway_usage[0] }}][usage={{ railway_usage[1] }}];way[~'^(railway:|)(construction|proposed|abandoned|disused|razed)$'~'^({{ railway_usage[0] }})$'][usage={{ railway_usage[1] }}];)">{{ tagTrans('railway', railway_usage[0]) }}: {{ keyTrans('railway=' ~ railway_usage[0] ~ ' usage') }}: {{ tagTrans('railway=' ~ railway_usage[0] ~ ' usage', railway_usage[1]) }}</option> |
|||
{% else %} |
|||
<option value="{{ k }}" query="(way[railway={{ k }}];way[~'^(railway:|)(construction|proposed|abandoned|disused|razed)$'~'^({{ k }})$'];)">{{ tagTrans('railway', k) }}</option> |
|||
{% endif %} |
|||
{% endfor %} |
|||
lifecycle: |
|||
name: |- |
|||
{{ repoTrans('lifecycle') }} |
|||
show_default: true |
|||
type: select |
|||
sort: false |
|||
values: |- |
|||
<option value="active" query="way[railway!~'^(construction|proposed|abandoned|disused|razed)$']">{{ repoTrans('lifecycle:active') }}</option> |
|||
{% for k, v in const.lifecycle %} |
|||
{% if k != 'active' %} |
|||
<option value="{{ k }}" query="way[railway={{ k }}]">{{ tagTrans('railway', k) }}</option> |
|||
{% endif %} |
|||
{% endfor %} |
|||
const: |
|||
types: |
|||
rail/main: |
|||
color: '#ff8100' |
|||
rail/branch: |
|||
color: '#daca00' |
|||
rail: |
|||
color: '#000000' |
|||
narrow_gauge: |
|||
color: '#000000' |
|||
subway: |
|||
color: '#0000ff' |
|||
tram: |
|||
color: '#ff00ff' |
|||
light_rail: |
|||
color: '#7f007f' |
|||
funicular: |
|||
color: '#00BD14' |
|||
monorail: |
|||
color: '#007f00' |
|||
unknown: |
|||
color: '#ff0000' |
|||
title: 'unknown' |
|||
lifecycle: |
|||
active: |
|||
dashArray: '' |
|||
hideInfo: true |
|||
proposed: |
|||
dashArray: '5,5' |
|||
construction: |
|||
dashArray: '5,2' |
|||
disused: |
|||
dashArray: '2,5' |
|||
abandoned: |
|||
dashArray: '1,5' |
|||
razed: |
|||
dashArray: '1,9' |
Write
Preview
Loading…
Cancel
Save
Reference in new issue