User:Mattblack82/Electric Railway Rendering Rules

From OpenStreetMap Wiki
Jump to navigation Jump to search

Introduction

This page contains a standard set rendering rules for Kosmos. These rules do not cover the whole range of OSM tagging currently in use, so you are free to edit these rules and add new ones if you feel something is missing. However a couple of things should be noted:

  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 (1.10 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).

Land Areas

Rule Name Targets Selector Template Options Comment
Coastline way natural=coastline Polyline (MinZoom=1, Color=#8BCCE5, Width=11:1;17:5, Curved=true)
Wood area natural=wood Polygon (Color=#99DB9C)
Beach area natural=beach Polygon (Color=#ffbc09)
Scrub area natural=scrub Polygon (Color=#99EE9C)
Fell area natural=fell Polygon (Color=#CDDB69)
Farm area landuse=farm Polygon (Color=#EFDD8B)
Attraction area tourism=attraction Polygon (Color=#F2CAEA)
Residential area landuse=residential Polygon (Color=#DCDCDC)
Industrial area landuse=industrial Polygon (Color=#FECDD8)
Brownfield area landuse=brownfield Polygon (Color=#FEADB8)
Construction area landuse=construction Polygon (Color=#A5826D)
Commercial area landuse=commercial Polygon (Color=#EFC8C8)
Retail area landuse=retail Polygon (Color=#F0DADA)
Reservoir area landuse=reservoir Polygon (Color=#B5D0D0)
Basin area landuse=basin Polygon (Color=#B5D0D0)
Forest area landuse=forest Polygon (Color=#CFECA8)
Cemetery area landuse=cemetery Polygon (Color=#C9EACE, BackgroundColor=#A5CCAD, HatchStyle=DashedVertical)
Allotments area landuse=allotments Polygon (Color=#C8B084)
Park area leisure=park Polygon (Color=#E7F1D3)
Playground area leisure=playground Polygon (Color=#C7F1A3)
Garden area leisure=garden Polygon (Color=#E7F1D3)
Common area leisure=common Polygon (Color=#CFECA8)
Recreation Ground area landuse=recreation_ground Polygon (Color=#E7F1D3)
Village Green area landuse=village_green Polygon (Color=#E7F1D3)
ParkingArea area amenity=parking Polygon (Color=#F6EEB7)
RailwayArea area landuse=railway Polygon (Color=#CCCCCC)
PowerSubstation area power=sub_station Polygon (Color=#CCCCCC)

Water Features

Rule Name Targets Selector Template Options Comment
Water area natural=water Polygon (Color=lightblue)
Marsh area natural=marsh Polygon (Color=blue, BackgroundColor=#00000000, BorderColor=blue, BorderWidth=1:1;12:1;15:3, HatchStyle=DashedHorizontal)
River way waterway=river Polyline (MinZoom=5, Color=lightblue, Width=5:1;10:2;17:14, Curved=true)
Drain way waterway=drain Polyline (MinZoom=13, Color=lightblue, Width=13:1;17:6, Curved=true)
Stream way waterway=stream Polyline (MinZoom=13, Color=lightblue, Width=13:1;17:6, Curved=true)
Canal way waterway=canal Polyline (MinZoom=5, Color=lightblue, Width=5:1;10:1;17:10, Curved=true)
Riverbank area waterway=riverbank Polygon (Color=lightblue)
Land area natural=land Polygon (Color=white)

Other Land Features

Rule Name Targets Selector Template Options Comment
Contours way ele=* for elevation contours generated by Srtm2Osm
.Major way ValueNum(e,"ele") % 100 = 0 Polyline (MinZoom=11, Color=#B0AD8852, Width=11:1;12:2, Curved=true) Major contours (100m ones)
.* way Polyline (MinZoom=12, Color=#B0AD8852, Width=1, Curved=true) all other contours

POIs

Rule Name Targets Selector Template Options Comment
RailwayStation node railway=station Symbol (Type=Diamond, MinZoom=13, Color=yellow, BorderColor=black, BorderWidth=15%, Size=13:6;17:20)
Text (MinZoom=12, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=14:6;17:14, TextLineOffset=-170%)
TramStop node railway=tram_stop Symbol (Type=Diamond, MinZoom=14, Color=blue, BorderColor=black, BorderWidth=15%, Size=10:4;14:8)
Text (MinZoom=12, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=14:6;17:14, TextLineOffset=-170%)
RailHalt node railway=halt Symbol (Type=Triangle, MinZoom=14, Color=blue, BorderColor=black, BorderWidth=15%, Size=10:4;14:8)
Text (MinZoom=12, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=14:6;17:14, TextLineOffset=-170%)
Switch-Text node railway=switch Text (MinZoom=15, Color=blue, TagToUse=ref, FontName=Trebuchet MS, FontStyle=bold, FontSize=15:3;17:12
Signal-Text node railway=signal Text (MinZoom=15, Color=red, TagToUse=ref, FontName=Trebuchet MS, FontStyle=bold, FontSize=15:3;17:12
Track-Text way railway=rail Text (MinZoom=15, Color=green, TagToUse=ref, FontName=Trebuchet MS, FontStyle=bold, FontSize=15:3;17:12)

Highways

Rule Name Targets Selector Template Options Comment
HighwayFootway way highway=footway Polyline (MinZoom=13, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwaySteps way highway=steps Polyline (MinZoom=13, Color=#cccccc, DashStyle=Dot, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayBridleway way highway=bridleway Polyline (MinZoom=13, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayCicleway way highway=cycleway Polyline (MinZoom=13, Color=#cccccc, DashStyle=Dash, Width=14:1;18:1) EliminateSeams
HighwayUnpaved way highway=unpaved Polyline (MinZoom=11, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayUnsurfaced way highway=unsurfaced Polyline (MinZoom=6, Color=#cccccc, Width=14:1;18:1) EliminateSeams deprecated
HighwayUnclassified way highway=unclassified Polyline (MinZoom=11, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayPedestrian way highway=pedestrian Polyline (MinZoom=13, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayPedestrianArea area highway=pedestrian area=yes Polygon (MinZoom=13, Color=#cccccc, BorderColor=gray, BorderWidth=1) EliminateSeams
HighwayResidential way highway=residential Polyline (MinZoom=11, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayLivingStreet way highway=living_street Polyline (MinZoom=11, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayService way highway=service Polyline (MinZoom=12, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayMinor way highway=minor Polyline (MinZoom=12, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayTrack way highway=track Polyline (MinZoom=11, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayTertiary way highway=tertiary Polyline (MinZoom=10, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwaySecondary way highway=secondary EliminateSeams
.Bridge bridge=yes Polyline (MinZoom=8, Color=#cccccc, BorderColor=gray, Width=14:1;18:1, BorderWidth=30%)
.* Polyline (MinZoom=8, Color=#cccccc, BorderColor=gray, Width=14:1;18:1)
HighwaySecondaryText way highway=secondary Text (MinZoom=15, Color=black, TagToUse=name, FontName=Arial, FontStyle=regular, FontSize=16:6;18:9)
HighwayPrimary way highway=primary EliminateSeams
.Bridge bridge=yes Polyline (MinZoom=6, Color=#cccccc, BorderColor=gray, Width=14:1;18:1, BorderWidth=30%)
.* Polyline (MinZoom=6, Color=#cccccc, BorderColor=gray, Width=14:1;18:1)
HighwayPrimaryText way highway=primary Text (MinZoom=15, Color=#cccccc, TagToUse=name, FontName=Arial, FontStyle=regular, FontSize=15:6;17:9)
HighwayPrimaryLink way highway=primary_link Polyline (MinZoom=6, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayTrunk way highway=trunk Polyline (MinZoom=6, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams
HighwayTrunkLink way highway=trunk_link Polyline (MinZoom=6, Color=#cccccc, BorderColor=gray, Width=14:1;18:1 EliminateSeams
HighwayMotorway way highway=motorway EliminateSeams
.Bridge bridge=yes Polyline (MinZoom=6, Color=#cccccc, BorderColor=gray, Width=14:1;18:1, BorderWidth=30%)
.* Polyline (MinZoom=6, Color=#cccccc, BorderColor=gray, Width=14:1;18:1)
HighwayMotorwayLink way highway=motorway_link Polyline (MinZoom=6, Color=#cccccc, BorderColor=gray, Width=14:1;18:1) EliminateSeams

Other Ways

Rule Name Targets Selector Template Options Comment
Rail way railway=rail EliminateSeams
.Electric electrified=yes Polyline (MinZoom=6, Color=#00DD00, BorderColor=red, Width=15:0;20:6, BorderWidth=10%) EliminateSeams
.* Polyline (MinZoom=6, Color=#DD0000, BorderColor=black, Width=15:0;20:6, BorderWidth=10%) EliminateSeams
Subway way railway=subway Polyline (MinZoom=6, Color=white, DashStyle=Dot, BorderColor=gray, Width=6:1;17:4) EliminateSeams
Tram way railway=tram Polyline (MinZoom=6, Color=black, DashStyle=Dot, BorderColor=gray, Width=6:1;17:4) EliminateSeams
LightRail way railway=light_rail Polyline (MinZoom=6, Color=#0000FF, DashStyle=Dot, BorderColor=gray, Width=15:0;20:6) EliminateSeams
RailDisused way railway=disused Polyline (MinZoom=10, Color=white, DashStyle=Dot, BorderColor=#DDDDDD, Width=10:1;17:4) EliminateSeams

Places

Rule Name Targets Selector Template Options Comment
PlaceCountry node place=country Text (MinZoom=3, MaxZoom=7, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=3:7;7:20)
PlaceCity node place=city Text (MinZoom=7, MaxZoom=14, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=7:10;17:30)
PlaceTown node place=town Text (MinZoom=10, MaxZoom=15, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=10:10;17:25)
PlaceVillage node place=village Text (MinZoom=12, MaxZoom=16, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=12:10;17:20)
PlaceIsland node place=island Text (MinZoom=12, MaxZoom=16, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=12:10;17:20)
PlaceSuburb node place=suburb Text (MinZoom=13, MaxZoom=16, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=13:10;17:20)
PlaceHamlet node place=hamlet Text (MinZoom=14, MaxZoom=17, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=14:8;17:14)
PlaceLocality node place=locality Text (MinZoom=14, MaxZoom=17, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=14:8;17:14)
PlaceFarm node place=farm Text (MinZoom=15, MaxZoom=19, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=15:8;17:13)

Buildings

Rule Name Targets Selector Template Options Comment
BuildingRail area building=railway Polygon (MinZoom=12, Color=#FF4444, BorderColor=#6B5B8E, BorderWidth=1)
BuildingAny area building=* Polygon (MinZoom=13, Color=#FFFFFF)

Navaids

Rule Name Targets Selector Template Options Comment
NavaidBuoy node man_made=buoy Symbol (Type=Diamond, MinZoom=11, Color=blue, BorderColor=black, BorderWidth=15%, Size=13:6;17:20)
NavaidLighthouse node man_made=lighthouse Symbol (Type=Triangle, MinZoom=10, Color=blue, BorderColor=black, BorderWidth=15%, Size=13:6;17:20)