Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landcover recolour #599

Merged
merged 6 commits into from
Jun 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@
[zoom >= 15] {
text-name: "[name]";
text-size: 9;
text-fill: darken(@farm, 70%);
text-fill: darken(@farmland, 70%);
text-face-name: @book-fonts;
text-halo-radius: 1;
text-wrap-width: 10;
Expand Down
82 changes: 68 additions & 14 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@
@track: #74dcba;
@pitch: #8ad3af;

// --- "base" landuses ---

@residential: #E1E1E1; // Lch(89,0,0)
@residential-line: #B9B9B9; // Lch(75,0,0)
@retail: #FFD6D1; // Lch(89,16,30)
@retail-line: #D99C95; // Lch(70,25,30)
@commercial: #F2DAD9; // Lch(89,8.5,25)
@commercial-line: #D1B2B0; // Lch(75,12,25)
@industrial: #EBDBE8; // Lch(89,9,330)
@industrial-line: #C6B3C3; // Lch(75,11,330)
@railway: @industrial;
@railway-line: @industrial-line;
@farmland: #EDDDC9; // Lch(89,12,80) (Also used for farm)
@farmland-line: #C8B69E; // Lch(75,15,80)

@farmyard: #EFD6B5; // Lch(87,20,80)
@farmyard-line: #D1B48C; // Lch(75,25,80)

// --- Other ----

@aerodrome: #ccc;
Expand All @@ -24,21 +42,15 @@
@campsite: #ccff99; // also caravan_site, picnic_site
@cemetery: #aacbaf; // also grave_yard
@construction: #9d9d6c;
@commercial: #efc8c8;
@danger_area: pink;
@desert: #e3b57a;
@field: #660;
@garages: #996;
@heath: #d6d99f;
@industrial: #dfd1d6; // also railway
@farmyard: #ddbf92;
@farm: #ead8bd; // also farmland
@parking: #f7efb7;
@playground: #ccfff1;
@power: #bbb;
@rest_area: #efc8c8; // also services
@retail: #f1dada;
@residential: #ddd;
@sand: #ffdf88;
@school: #f0f0d8; // also university, college, hospital, kindergarten

Expand Down Expand Up @@ -104,6 +116,14 @@

[feature = 'landuse_residential'][zoom >= 10] {
polygon-fill: @residential;
[zoom >= 16] {
line-width: .5;
line-color: @residential-line;
[name!=''] {
line-width: 0.7;
}

}
}

[feature = 'landuse_garages'][zoom >= 12] {
Expand Down Expand Up @@ -189,12 +209,23 @@

[feature = 'landuse_farmyard'][zoom >= 9] {
polygon-fill: @farmyard;
[zoom >= 16] {
line-width: 0.5;
line-color: @farmyard-line;
[name!=''] {
line-width: 0.7;
}
}
}

[feature = 'landuse_farm'],
[feature = 'landuse_farmland'] {
[zoom >= 9] {
polygon-fill: @farm;
polygon-fill: @farmland;
[zoom >= 16] {
line-width: .5;
line-color: @farmland-line;
}
}
}

Expand All @@ -211,16 +242,31 @@

[feature = 'landuse_retail'][zoom >= 10] {
polygon-fill: @retail;
[zoom >= 15] {
line-width: 0.3;
line-color: red;
[zoom >= 16] {
line-width: 0.5;
line-color: @retail-line;
[name!=''] {
line-width: 0.7;
}
}
}

[feature = 'landuse_industrial'],
[feature = 'landuse_railway'] {
[zoom >= 10] {
polygon-fill: @industrial;
[feature = 'landuse_industrial'][zoom >= 10] {
polygon-fill: @industrial;
[zoom >= 16] {
line-width: .5;
line-color: @industrial-line;
[name!=''] {
line-width: 0.7;
}
}
}

[feature = 'landuse_railway'][zoom >= 10] {
polygon-fill: @railway;
[zoom >= 16][name!=''] {
line-width: 0.7;
line-color: @railway-line;
}
}

Expand All @@ -246,6 +292,14 @@

[feature = 'landuse_commercial'][zoom >= 10] {
polygon-fill: @commercial;
[zoom >= 16] {
line-width: 0.5;
line-color: @commercial-line;
[name!=''] {
line-width: 0.7;
}

}
}

[feature = 'landuse_brownfield'],
Expand Down
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
],
"Datasource": {
"type": "postgis",
"table": "(select way, religion,\ncoalesce (aeroway, amenity, landuse, leisure, military, \"natural\", power, tourism, highway) as feature from (\nselect way,\n('aeroway_' || (case when aeroway in ('apron', 'aerodrome') then aeroway else null end)) as aeroway,\n('amenity_' || (case when amenity in ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard') then amenity else null end)) as amenity,\n('landuse_' || (case when landuse in ('quarry', 'vineyard', 'orchard', 'cemetery', 'grave_yard', 'residential', 'garages', 'field', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'greenfield', 'construction') then landuse else null end)) as landuse,\n('leisure_' || (case when leisure in ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'picnic_table') then leisure else null end)) as leisure,\n('military_' || (case when military in ('barracks', 'danger_area') then military else null end)) as military,\n('natural_' || (case when \"natural\" in ('field','beach','desert','heath','mud','grassland','wood','sand','scrub') then \"natural\" else null end)) as \"natural\",\n('power_' || (case when power in ('station','sub_station','substation','generator') then power else null end)) as power,\n('tourism_' || (case when tourism in ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo') then tourism else null end)) as tourism,\n('highway_' || (case when highway in ('services', 'rest_area') then highway else null end)) as highway,\ncase when religion in ('christian','jewish') then religion else 'INT-generic'::text end as religion\n from planet_osm_polygon\n where landuse is not null\n or leisure is not null\n or aeroway in ('apron','aerodrome')\n or amenity in ('parking','university','college','school','hospital','kindergarten','grave_yard')\n or military in ('barracks','danger_area')\n or \"natural\" in ('field','beach','desert','heath','mud','grassland','wood','sand','scrub')\n or power in ('station','sub_station','generator')\n or tourism in ('attraction','camp_site','caravan_site','picnic_site','zoo')\n or highway in ('services','rest_area')\n order by z_order,way_area desc\n ) as landcover\n) as features",
"table": "(select way, name, religion,\ncoalesce (aeroway, amenity, landuse, leisure, military, \"natural\", power, tourism, highway) as feature from (\nselect way, COALESCE(name,'') AS name, \n('aeroway_' || (case when aeroway in ('apron', 'aerodrome') then aeroway else null end)) as aeroway,\n('amenity_' || (case when amenity in ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard') then amenity else null end)) as amenity,\n('landuse_' || (case when landuse in ('quarry', 'vineyard', 'orchard', 'cemetery', 'grave_yard', 'residential', 'garages', 'field', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'greenfield', 'construction') then landuse else null end)) as landuse,\n('leisure_' || (case when leisure in ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'picnic_table') then leisure else null end)) as leisure,\n('military_' || (case when military in ('barracks', 'danger_area') then military else null end)) as military,\n('natural_' || (case when \"natural\" in ('field','beach','desert','heath','mud','grassland','wood','sand','scrub') then \"natural\" else null end)) as \"natural\",\n('power_' || (case when power in ('station','sub_station','substation','generator') then power else null end)) as power,\n('tourism_' || (case when tourism in ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo') then tourism else null end)) as tourism,\n('highway_' || (case when highway in ('services', 'rest_area') then highway else null end)) as highway,\ncase when religion in ('christian','jewish') then religion else 'INT-generic'::text end as religion\n from planet_osm_polygon\n where landuse is not null\n or leisure is not null\n or aeroway in ('apron','aerodrome')\n or amenity in ('parking','university','college','school','hospital','kindergarten','grave_yard')\n or military in ('barracks','danger_area')\n or \"natural\" in ('field','beach','desert','heath','mud','grassland','wood','sand','scrub')\n or power in ('station','sub_station','generator')\n or tourism in ('attraction','camp_site','caravan_site','picnic_site','zoo')\n or highway in ('services','rest_area')\n order by z_order,way_area desc\n ) as landcover\n) as features",
"extent": "-20037508,-19929239,20037508,19929239",
"key_field": "",
"geometry_field": "",
Expand Down