User:Astrofreak85/TestRules1

From OpenStreetMap Wiki
Jump to: navigation, 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)