Skip to content

Commit

Permalink
Add symbols, and start on the landcover layers.
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitystorm committed Nov 15, 2012
0 parents commit f5f8a82
Show file tree
Hide file tree
Showing 264 changed files with 443 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.thumb.png
layers/
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# OpenStreetMap Carto


# Notes on conversion

* Always specify zoom levels as either >= or < . Don't use either = or =<
* Open curly braces on the same line, and close on an empty line.
* One space before and after = etc
* Two space indents. No tabs.
* space after : but no before
* If there is a `&minscale_zoom18;`, ignore it. These really mess up any attempts to run the style at z19
353 changes: 353 additions & 0 deletions landcover.mss
Original file line number Diff line number Diff line change
@@ -0,0 +1,353 @@
#landcover {
[leisure = 'swimming_pool'][zoom >= 14]::leisure {
polygon-fill: #b5d0d0;
line-color: blue;
line-width: 0.5;
}

[leisure = 'playground'][zoom >= 13]::leisure {
polygon-fill: #ccfff1;
line-color: #666;
line-width: 0.3;
}

[tourism = 'camp_site']::tourism,
[tourism = 'caravan_site']::tourism,
[tourism = 'picnic_site']::tourism {
[zoom >= 13] {
polygon-fill: #ccff99;
polygon-opacity: 0.5;
line-color: #666;
line-width: 0.3;
}
}

[tourism = 'attraction'][zoom >= 10]::tourism {
polygon-fill: #f2caea;
}

[landuse = 'quarry'][zoom >= 11]::landuse {
polygon-pattern-file: url('symbols/quarry2.png');
line-width: 0.5;
line-color: grey;
}

[landuse = 'vineyard']::landuse {
[zoom >= 10][zoom < 13] {
polygon-fill: #abdf96;
}
[zoom >= 13] {
polygon-pattern-file: url('symbols/vineyard.png');
}
}

[landuse = 'orchard'][zoom >= 10]::landuse {
polygon-pattern-file: url('symbols/orchard.png');
}

[landuse = 'cemetery']::landuse,
[landuse = 'grave_yard']::landuse,
[amenity = 'grave_yard']::landuse {
[zoom >= 10][zoom < 15] {
polygon-fill: #aacbaf;
}
[zoom >= 15] {
[religion = 'jewish'] { polygon-pattern-file: url('symbols/cemetery_jewish.18.png'); }
[religion = 'christian'] { polygon-pattern-file: url('symbols/grave_yard.png'); }
[religion = 'INT-generic'] { polygon-pattern-file: url('symbols/grave_yard_generic.png'); }
}
}

[landuse = 'residential'][zoom >= 10]::landuse {
polygon-fill: #ddd;
}

[landuse = 'garages'][zoom >= 12]::landuse {
polygon-fill: #996;
polygon-opacity: 0.2;
}

[military = 'barracks'][zoom >= 10]::military {
polygon-fill: #ff8f8f;
}

[landuse = 'field']::landuse,
[natural = 'field']::natural {
[zoom >= 10] {
polygon-fill: #666600;
polygon-opacity: 0.2;
[zoom >= 14] {
line-width: 0.3;
line-opacity: 0.4;
line-color: #660;
}
}
}

[military = 'danger_area']::military {
[zoom >= 9][zoom < 11] {
polygon-fill: pink;
polygon-opacity: 0.3;
}
[zoom >= 11] {
polygon-pattern-file: url('symbols/danger.png');
}
}

[landuse = 'meadow']::landuse,
[landuse = 'grass']::landuse {
[zoom >= 10] {
polygon-fill: #cfeca8;
}
}

[landuse = 'park']::landuse,
[landuse = 'recreation_ground']::landuse {
[zoom >= 10] {
polygon-fill: #b6fdb6;
polygon-opacity: 0.6;
}
}

[tourism = 'zoo'][zoom >= 10]::tourism {
polygon-pattern-file: url('symbols/zoo.png');
}

[leisure = 'common'][zoom >= 10]::leisure {
polygon-fill: #cfeca8;
}

[leisure = 'garden'][zoom >= 10]::leisure {
polygon-fill: #cfeca8;
}

[leisure = 'golf_course'][zoom >= 10]::leisure {
polygon-fill: #b5e3b5;
}

[landuse = 'allotments']::landuse {
[zoom >= 10][zoom < 14] {
polygon-fill: #e5c7ab;
}
[zoom >= 14] {
polygon-pattern-file: url('symbols/allotments.png');
}
}

[landuse = 'forest']::landuse {
[zoom >= 8][zoom < 14] {
polygon-fill: #8dc56c;
}
[zoom >= 14] {
polygon-pattern-file: url('symbols/forest.png');
}
}

[landuse = 'farmyard'][zoom >= 9]::landuse {
polygon-fill: #ddbf92;
}

[landuse = 'farm']::landuse,
[landuse = 'farmland']::landuse {
[zoom >= 9] {
polygon-fill: #ead8bd;
}
}

[landuse = 'recreation_ground']::landuse,
[landuse = 'conservation']::landuse {
[zoom >= 10] {
polygon-fill: #cfeca8;
}
}

[landuse = 'village_green'][zoom >= 11]::landuse {
polygon-fill: #cfeca8;
}

[landuse = 'retail'][zoom >= 10]::landuse {
polygon-fill: #f1dada;
[zoom >= 15] {
line-width: 0.3;
line-color: red;
}
}

[landuse = 'industrial']::landuse,
[landuse = 'railway']::landuse {
[zoom >= 10] {
polygon-fill: #dfd1d6;
}
}

[power = 'station']::power,
[power = 'generator']::power {
[zoom >= 10] {
polygon-fill: #bbb;
[zoom >= 12] {
line-width: 0.4;
line-color: #555;
}
}
}

[power = 'sub_station'][zoom >= 13]::power {
polygon-fill: #bbb;
line-width: 0.4;
line-color: #555;
}

[landuse = 'commercial'][zoom >= 10]::landuse {
polygon-fill: #efc8c8;
}

[landuse = 'brownfield'],
[landuse = 'landfill'],
[landuse = 'greenfield'],
[landuse = 'construction'] {
[zoom >= 10]::landuse {
polygon-fill: #9d9d6c;
polygon-opacity: 0.7;
}
}

[natural = 'wood']::natural,
[landuse = 'wood']::landuse {
[zoom >= 8] {
polygon-fill: #aed1a0;
}
}

[natural = 'desert'][zoom >= 8]::natural {
polygon-fill: #e3b57a;
}

[natural = 'sand'][zoom >= 10]::natural {
polygon-fill: #ffdf88;
}

[natural = 'heath'][zoom >= 10]::natural {
polygon-fill: #d6d99f;
}

[natural = 'grassland'][zoom >= 10]::natural {
polygon-fill: #c6e4b4;
}

[natural = 'scrub']::natural {
[zoom >= 10][zoom < 14] {
polygon-fill: #c6e4b4;
}
[zoom >= 14] {
polygon-pattern-file: url('symbols/scrub.png');
}
}

[amenity = 'university'],
[amenity = 'college'],
[amenity = 'school'],
[amenity = 'hospital'],
[amenity = 'kindergarten'] {
[zoom >= 10]::amenity {
polygon-fill: #f0f0d8;
[zoom >= 12] {
line-width: 0.3;
line-color: brown;
}
}
}

[amenity = 'parking'][zoom >= 10]::amenity {
polygon-fill: #f7efb7;
[zoom >= 15] {
line-width: 0.3;
line-color: #eeeed1;
}
}

[aeroway = 'apron'][zoom >= 12]::aeroway {
polygon-fill: #e9d1ff;
}

[aeroway = 'aerodrome'][zoom >= 12]::aeroway {
polygon-fill: #ccc;
polygon-opacity: 0.2;
line-width: 0.2;
line-color: #555;
}

[natural = 'beach'][zoom >= 13]::natural {
polygon-pattern-file: url('symbols/beach.png');
}

[highway = 'services'],
[highway = 'rest_area'] {
[zoom >= 14]::highway {
polygon-fill: #efc8c8;
}
}
}

/*
<Style name="landcover_line">
<Rule>
&maxscale_zoom14;
&minscale_zoom15;
<LineSymbolizer stroke-linejoin="round" stroke="#f2efe9" stroke-width="3" stroke-linecap="square"/>
</Rule>
<Rule>
&maxscale_zoom16;
<LineSymbolizer stroke-linejoin="round" stroke="#f2efe9" stroke-width="6" stroke-linecap="square"/>
</Rule>
</Style>
<Style name="sports_grounds">
<Rule>
<Filter>[leisure] = 'sports_centre' or [leisure] = 'stadium'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill="#33cc99"/>
</Rule>
<Rule>
<Filter>[leisure]='track'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill="#74dcba"/>
<LineSymbolizer stroke="#888" stroke-width="0.5"/>
</Rule>
<Rule>
<Filter>[leisure] = 'pitch'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill="#8ad3af"/>
<LineSymbolizer stroke="#888" stroke-width="0.5"/>
</Rule>
</Style>
<Layer name="landcover_line" status="on" srs="&osm2pgsql_projection;">
<StyleName>landcover_line</StyleName>
<Datasource>
<Parameter name="table">
(select way
from &prefix;_line
where man_made='cutline'
) as leisure
</Parameter>
&datasource-settings;
</Datasource>
</Layer>
<Layer name="sports_grounds" status="on" srs="&osm2pgsql_projection;">
<StyleName>sports_grounds</StyleName>
<Datasource>
<Parameter name="table">
(select way,leisure,
case when leisure='pitch' then 2
when leisure='track' then 1
else 0 end as prio
from &prefix;_polygon
where leisure in ('sports_centre','stadium','pitch','track')
order by z_order,prio,way_area desc
) as sports_grounds
</Parameter>
&datasource-settings;
</Datasource>
</Layer>
*/
Loading

0 comments on commit f5f8a82

Please sign in to comment.