Skip to content

Commit

Permalink
adding basic glacier styling and rock/scree rendering in antarctica
Browse files Browse the repository at this point in the history
  • Loading branch information
imagico committed Jun 18, 2014
1 parent 220d840 commit 9b0bd2a
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 9 deletions.
11 changes: 11 additions & 0 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -401,6 +403,15 @@
}
}

#bare-rock {
[zoom >= 6] {
polygon-fill: @rock;
['natural' = 'scree'] {
polygon-fill: @scree;
}
}
}

/* man_made=cutline */
#landcover-line {
[zoom >= 14] {
Expand Down
2 changes: 2 additions & 0 deletions openstreetmap-carto.style
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 24 additions & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": [
Expand Down
3 changes: 2 additions & 1 deletion shapefiles.mss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
polygon-fill: @land-color;
}
[zoom >= 1][zoom < 10] {
polygon-pattern-file: url('symbols/glacier.png');
polygon-fill: #ddecec;
}
}

Expand All @@ -41,6 +41,7 @@

#coast-poly-south {
[zoom >= 10] {
polygon-fill: #ddecec;
polygon-pattern-file: url('symbols/glacier2.png');
}
}
Expand Down
Binary file modified symbols/glacier2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 15 additions & 7 deletions water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
}
}
Expand Down

0 comments on commit 9b0bd2a

Please sign in to comment.