User:Astrofreak85/TestRules1

From OpenStreetMap Wiki
Jump to navigation Jump to search

Introduction

This page contains an old version (Kosmos 1.x) of standard set rendering rules for Kosmos. For the new version (Kosmos 2.x), go to Kosmos General Purpose Rules page.

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=#ccff99)
Forest area landuse=forest Polygon (Color=#ccff99)

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



Highways

Rule Name Targets Selector Template Options Comment
HighwayMotorway way highway=motorway EliminateSeams
.* Polyline (MinZoom=6, Color=#99cccc, Width=6:1;17:14)
HighwayMotorwayLink way highway=motorway_link Polyline (MinZoom=6, Color=#99cccc, Width=6:1;17:8) EliminateSeams

Places

Other Ways

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)
PlaceIsland node place=island Text (MinZoom=12, MaxZoom=16, Color=black, TagToUse=name, FontName=Trebuchet MS, FontStyle=bold, FontSize=12:10;17:20)
Rule Name Targets Selector Template Options Comment
Border way boundary=administrative
.level2 admin_level=2 Polyline (MinZoom=1, Color=red, Width=1:1;9:2;17:6, Curved=true)
.level4 admin_level=4 Polyline (MinZoom=10, Color=black, Width=1:1;9:2;17:6, Curved=true)
.level8 admin_level=8 Polyline (MinZoom=10, Color=#A4A4A4, Width=1:1;9:2;5:5, Curved=true))
.level9 admin_level=9 Polyline (MinZoom=12, Color=#A4A4A4, Width=1:1;9:2;5:3, Curved=true))
.level10 admin_level=10 Polyline (MinZoom=12, Color=#A4A4A4, Width=1:1;9:1.5;5:2,Curved=true))
.level6 admin_level=6 Polyline (MinZoom=10, Color=red, Width=1:1;9:3;17:10, Curved=true))
.* Polyline (MinZoom=10, Color=black, DashStyle=DashDot, Width=1:1;9:2;17:8, Curved=true)
Runway way aeroway=runway Polyline (MinZoom=11, Color=#BBBBCC, Width=11:2;17:30)