User:Mdeen/Kosmos-Railway

From OpenStreetMap Wiki
Jump to navigation Jump to search

Introduction

This page contains a set of Kosmos rendering rules for a railway map that renders railway lines with different color according to the electrification details.

General tips:

  1. See Kosmos Rendering Help for help on how to write rendering rules.
  2. Before committing changes to the page, please make sure the rules are actually working. Try them with the latest version of Kosmos (2.00 or above), since they are not compatible with previous versions.
  3. These rules are intended for a general-purpose map, so if you want to create specialized maps, the preferred way is to create a new rules page (see Category:Kosmos_rules).

URL of the rules to use in Kosmos: http://wiki.openstreetmap.org/index.php?title=User:Mdeen/Kosmos-Railway

Options

Option Value Comment
MinKosmosVersion 2.1 Minimal version of Kosmos needed to use these rules
LandBackgroundColor #F8F8F8
SeaColor #B5D6F1

POIs

Rule Name Targets Selector Template Options Comment
RailwayStation node railway=station Symbol (Type=Circle, MinZoom=7, Color=red, BorderColor=black, BorderWidth=15%, Size=7:1;10:6;17:12)
RailwayHalt node railway=halt Symbol (Type=Circle, MinZoom=8, Color=red, BorderColor=black, BorderWidth=15%, Size=8:1;10:5;17:11)

Railways

Rule Name Targets Selector Template Options Comment
Rail way railway=rail Polyline (MinZoom=6, Color=#808080, DashStyle=solid, BorderColor=#808080, Width=6:1;17:6) EliminateSeams
   
.tunnel way tunnel=yes Polyline (MinZoom=6, Color=white, DashStyle=solid, BorderColor=#808080, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
________
________
Diesel way railway=rail electrified=no Polyline (MinZoom=6, Color=black, DashStyle=solid, BorderColor=black, Width=6:1;17:6) EliminateSeams
   
.tunnel way tunnel=yes Polyline (MinZoom=6, Color=white, DashStyle=solid, BorderColor=black, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
________
________
Voltage1500 way railway=rail voltage=1500 Polyline (MinZoom=6, Color=#800080, DashStyle=solid, BorderColor=#800080, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
   
.tunnel way tunnel=yes Polyline (MinZoom=6, Color=white, DashStyle=solid, BorderColor=#800080, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
________
________
Voltage3000 way railway=rail voltage=3000 Polyline (MinZoom=6, Color=#1C2DA0, DashStyle=solid, BorderColor=#1C2DA0, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
   
.tunnel way tunnel=yes Polyline (MinZoom=6, Color=white, DashStyle=solid, BorderColor=#1C2DA0, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
________
________
Voltage15000 way railway=rail voltage=15000 Polyline (MinZoom=6, Color=#C00000, DashStyle=solid, BorderColor=#C00000, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
   
.tunnel way tunnel=yes Polyline (MinZoom=6, Color=white, DashStyle=solid, BorderColor=#C00000, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
________
________
Voltage25000 way railway=rail voltage=25000 Polyline (MinZoom=6, Color=#008080, DashStyle=solid, BorderColor=#008080, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
   
.tunnel way tunnel=yes Polyline (MinZoom=6, Color=white, DashStyle=solid, BorderColor=#008080, BorderDashStyle=Dash, Width=6:1;17:6) EliminateSeams
________
________
Light-Rail way railway=light_rail Polyline (MinZoom=6, Color=black, DashStyle=solid, BorderColor=gray, Width=6:1;17:2) EliminateSeams
.tunnel way tunnel=yes Polyline (MinZoom=6, Color=white, DashStyle=solid, BorderColor=black, BorderDashStyle=Dash, Width=6:1;17:2) EliminateSeams
Tram way railway=tram Polyline (MinZoom=6, Color=black, DashStyle=solid, BorderColor=gray, Width=6:1;17:2) EliminateSeams
.tunnel way tunnel=yes Polyline (MinZoom=6, Color=white, DashStyle=solid, BorderColor=black, BorderDashStyle=Dash, Width=6:1;17:2) EliminateSeams
Subway way railway=Subway Polyline (MinZoom=6, Color=black, DashStyle=Dash, BorderColor=gray, Width=6:1;17:2) EliminateSeams
.tunnel way tunnel=yes Polyline (MinZoom=6, Color=white, DashStyle=Dash, BorderColor=gray, BorderDashStyle=Dash, Width=6:1;17:2) EliminateSeams
RailDisused way railway=disused Polyline (MinZoom=10, Color=white, DashStyle=Dot, BorderColor=#DDDDDD, Width=10:1;17:4) EliminateSeams