From 9b0bd2adc20e5b586206e48256cd7a4ca1819409 Mon Sep 17 00:00:00 2001 From: imagico Date: Wed, 18 Jun 2014 17:46:48 +0200 Subject: [PATCH] adding basic glacier styling and rock/scree rendering in antarctica --- landcover.mss | 11 +++++++++++ openstreetmap-carto.style | 2 ++ project.mml | 25 ++++++++++++++++++++++++- shapefiles.mss | 3 ++- symbols/glacier2.png | Bin 199 -> 262 bytes water.mss | 22 +++++++++++++++------- 6 files changed, 54 insertions(+), 9 deletions(-) diff --git a/landcover.mss b/landcover.mss index b9291988ec..7e1af0a26b 100644 --- a/landcover.mss +++ b/landcover.mss @@ -52,6 +52,8 @@ @power: #bbb; @rest_area: #efc8c8; // also services @sand: #ffdf88; +@scree: #CCBBAA; +@rock: #B2A7A3; @school: #f0f0d8; // also university, college, hospital, kindergarten #landcover { @@ -401,6 +403,15 @@ } } +#bare-rock { + [zoom >= 6] { + polygon-fill: @rock; + ['natural' = 'scree'] { + polygon-fill: @scree; + } + } +} + /* man_made=cutline */ #landcover-line { [zoom >= 14] { diff --git a/openstreetmap-carto.style b/openstreetmap-carto.style index 1c53f731d0..4dc1680780 100644 --- a/openstreetmap-carto.style +++ b/openstreetmap-carto.style @@ -142,6 +142,8 @@ node,way waterway text polygon node,way wetland text polygon node,way width text linear node,way wood text linear +node,way glacier:type text polygon +node,way geological text polygon node,way z_order int4 linear # This is calculated during import way way_area real # This is calculated during import diff --git a/project.mml b/project.mml index 1da9ca4898..1af141c1f5 100644 --- a/project.mml +++ b/project.mml @@ -251,7 +251,7 @@ ], "Datasource": { "type": "postgis", - "table": " (select way,\"natural\",waterway,landuse,name\n from planet_osm_polygon\n where (waterway in ('dock','mill_pond','riverbank','canal')\n or landuse in ('reservoir','water','basin')\n or \"natural\" in ('lake','water','land','glacier','mud'))\n and building is null\n order by z_order,way_area desc\n ) as water_areas", + "table": " (select way,\"natural\",waterway,landuse,geological,\"glacier:type\",name\n from planet_osm_polygon\n where (waterway in ('dock','mill_pond','riverbank','canal')\n or landuse in ('reservoir','water','basin')\n or \"natural\" in ('lake','water','land','glacier','mud'))\n and building is null\n order by z_order,way_area desc\n ) as water_areas", "extent": "-20037508,-19929239,20037508,19929239", "key_field": "", "geometry_field": "way", @@ -264,6 +264,29 @@ "advanced": {}, "name": "water-areas" }, + { + "geometry": "polygon", + "extent": [ + -179.99999692067183, + -85.051, + 179.99999692067183, + -60 + ], + "Datasource": { + "type": "postgis", + "table": " (select way,\"natural\"\n from planet_osm_polygon\n where \"natural\" in ('bare_rock','scree')\n order by z_order,way_area desc\n ) as bare_rock", + "extent": "-20037508,-20037508,20037508,8400000", + "key_field": "", + "geometry_field": "way", + "dbname": "gis" + }, + "id": "bare-rock", + "class": "", + "srs-name": "900913", + "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", + "advanced": {}, + "name": "bare-rock" + }, { "geometry": "polygon", "extent": [ diff --git a/shapefiles.mss b/shapefiles.mss index ba95aa7f82..c8fc8d9d16 100644 --- a/shapefiles.mss +++ b/shapefiles.mss @@ -29,7 +29,7 @@ polygon-fill: @land-color; } [zoom >= 1][zoom < 10] { - polygon-pattern-file: url('symbols/glacier.png'); + polygon-fill: #ddecec; } } @@ -41,6 +41,7 @@ #coast-poly-south { [zoom >= 10] { + polygon-fill: #ddecec; polygon-pattern-file: url('symbols/glacier2.png'); } } diff --git a/symbols/glacier2.png b/symbols/glacier2.png index 90b18446d811b130e7ae535a8ee7008ae8a67963..19da11499877ae9ef401c0e2c9447984b1de4e95 100644 GIT binary patch delta 225 zcmX@k*v2$LQi_d%fx&^T&lE_pC3(BMF#HF>1$&oIo~S5M&tBr`>&kwQO;C_iYLny4 zi$GPAJzX3_GVZ;-xsbQPK%niS_U|hj{_~hFzu6$$rKBhjqc~xY|G#(hR%AwAGcCz= zVqoKuFi1Giz{m__G=fP8*Dc{djlibP0l+XkKsP$5J literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^Za{3o!2~4Fr${CNDb50q$YKTtZXpn6ymYtj4^Xhu z)5S5QV$R#k8#x;s1Q;BD=O0yCbA(UFNm+Tbc**=m-oE}ki@KZr$(yE~H+OKFrM$$+ zqjdt8qNtNrO9;nGfgnY&z`UsKZ?pb9)n8J*_TWSPCEa5e8vr~ TiW^&ij$rU~^>bP0l+XkK9*;ve diff --git a/water.mss b/water.mss index 2657a0eb46..8e9fe7e8af 100644 --- a/water.mss +++ b/water.mss @@ -2,13 +2,21 @@ #water-areas { [natural = 'glacier']::natural { - [zoom >= 6] { - line-dasharray: 4,2; - line-width: 1.5; - line-color: #9cf; - polygon-pattern-file: url('symbols/glacier.png'); - [zoom >= 8] { - polygon-pattern-file: url('symbols/glacier2.png'); + ['glacier:type' = 'shelf'][zoom >= 2], + ['glacier:type' = 'ice_tongue'][zoom >= 4] { + polygon-fill: #d4e6e6; + } + ['glacier:type' != 'shelf']['glacier:type' != 'ice_tongue'] { + ['glacier:type' = 'icecap'][zoom >= 4], + [zoom >= 6] { + line-dasharray: 4,2; + line-width: 1.5; + line-color: #9cf; + polygon-fill: #ddecec; + [geological = 'moraine'] { polygon-fill: #D8DEDE; } + [zoom >= 8] { + polygon-pattern-file: url('symbols/glacier2.png'); + } } } }