Since rendering rules parsing and processing has more or less been implemented a few weeks ago, I think it’s time to show how these rules look like.

I’ve tried to mimic some of the styles and colors used for Mapnik OSM map (although this covers only about 10% of Mapnik’s rules). I won’t be explaining these rules right now because I’m interested in what you think of them at the first glance – can you understand the basic concept or not? Are the rules too verbose? Are they legible? The only hint I will give is: indentation is important!

So here it is, the first part (I have to split this into two posts, WordPress problems) :

features
    parking : amenity=parking
 
    contours major : contour[elevation=50]
    contours minor : contour[elevation=10]
 
    areas
        forest : landuse=forest OR natural=wood
        farm : landuse=farm
        fell : natural=fell
        national park : boundary=national_park
        water : natural=water OR waterway=riverbank
        residential area : landuse=residential
    lines
        river : waterway=river
        railway : railway=rail
        road motorway : highway=motorway
        road motorway link : highway=motorway_link
        road trunk : highway=trunk
        road primary : highway=primary
        road secondary : highway=secondary
        road tertiary : highway=tertiary
        road unclassified : highway=unclassified
        road residential : highway=residential
        road track : highway=track
        road footway : highway=footway
 
        state borders : relation[boundary=administrative AND admin_level=4]
 
properties
    map-background-color    : #F1EEE8
    map-background-opacity    : 1
 
rules
    rulefor : areas
        define
            line-style : none
        for : forest
            define
                min-zoom : 9
                fill-color : #8DC56C
        elsefor : farm
            define
                fill-color : #E9D8BD
        elsefor : fell
            define
                fill-color : #C5FF5B black 10%
        elsefor : water
            define
                fill-color : #B5D0D0
        elsefor : residential
            define
                fill-color : #DCDCDC
        else
            stop
        draw : fill