Skip to content

Commit

Permalink
unify colors and new patterns for some green landcovers:
Browse files Browse the repository at this point in the history
* unify landuse=meadow and natural=grassland
* unify base color of landuse=orchard and landuse=vineyard
* new fine grained pattern for landuse=vineyard
* patterns for orchard/vineyard start at z=14 instead of z=13
* move landuse=conservation to nature reserve boundaries
  • Loading branch information
imagico committed Jul 14, 2015
1 parent 675586e commit 5f76d2a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 22 deletions.
6 changes: 3 additions & 3 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1389,9 +1389,9 @@
text-size: @landcover-font-size;
[way_pixels > 12000] { text-size: @landcover-font-size-big; }
[way_pixels > 48000] { text-size: @landcover-font-size-bigger; }
text-fill: darken(@vineyard, 50%);
text-fill: darken(@orchard, 50%);
text-face-name: @landcover-face-name;
text-halo-radius: 1.5; /* extra halo needed to overpower the vineyard polygon pattern */
text-halo-radius: 1;
text-halo-fill: rgba(255,255,255,0.6);
text-wrap-width: @landcover-wrap-width-size;
[way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; }
Expand Down Expand Up @@ -2100,7 +2100,7 @@
text-size: @landcover-font-size;
[way_pixels > 12000] { text-size: @landcover-font-size-big; }
[way_pixels > 48000] { text-size: @landcover-font-size-bigger; }
text-fill: darken(@grassland, 60%);
text-fill: darken(@grass, 50%);
text-face-name: @landcover-face-name;
text-halo-radius: 1;
text-halo-fill: rgba(255,255,255,0.6);
Expand Down
34 changes: 19 additions & 15 deletions landcover.mss
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// --- Parks, woods, other green things ---

@forest: #a0cf85;
@grass: #cfeca8; // also meadow, common, garden, village_green, conservation
@grass: #cdebb0; // also meadow, common, garden, village_green
@golf_course: #b5e3b5;
@park: #cdf7c9; // also recreation_ground
@wood: #aed1a0;
@vineyard: #b3e2a8;
@grassland: #c6e4b4;
@scrub: #b5e3b5;
@orchard: #aedfa3;

// --- sports ---

Expand Down Expand Up @@ -55,7 +54,6 @@
@sand: #f5e9c6;
@school: #f0f0d8; // also university, college, hospital, kindergarten
@station: #d4aaaa;
@orchard: #9ed88f;
@tourism: #734a08;
@quarry: #c5c3c3;
@military: #f55;
Expand Down Expand Up @@ -114,23 +112,30 @@

[feature = 'landuse_vineyard'] {
[zoom >= 10] {
polygon-fill: @vineyard;
polygon-fill: @orchard;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
[zoom >= 13] {
[zoom >= 14] {
polygon-pattern-file: url('symbols/vineyard.png');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
}
}

[feature = 'landuse_orchard'][zoom >= 10] {
polygon-fill: @orchard;
polygon-pattern-file: url('symbols/orchard.png');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
[feature = 'landuse_orchard'] {
[zoom >= 10] {
polygon-fill: @orchard;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
[zoom >= 14] {
polygon-pattern-file: url('symbols/orchard.png');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
}
}

[feature = 'landuse_cemetery'],
Expand Down Expand Up @@ -296,8 +301,7 @@
}
}

[feature = 'landuse_recreation_ground'],
[feature = 'landuse_conservation'] {
[feature = 'landuse_recreation_ground'] {
[zoom >= 10] {
polygon-fill: @grass;
[way_pixels >= 4] { polygon-gamma: 0.75; }
Expand Down Expand Up @@ -429,7 +433,7 @@
}

[feature = 'natural_grassland'][zoom >= 10] {
polygon-fill: @grassland;
polygon-fill: @grass;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
Expand Down
4 changes: 2 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@
"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",
"Datasource": {
"extent": "-20037508,-20037508,20037508,20037508",
"table": "(SELECT\n way,\n name,\n boundary,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n) AS national_park_boundaries",
"table": "(SELECT\n way,\n name,\n boundary,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (boundary = 'national_park' OR leisure = 'nature_reserve' OR landuse = 'conservation')\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n) AS national_park_boundaries",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down Expand Up @@ -1927,7 +1927,7 @@
"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",
"Datasource": {
"extent": "-20037508,-20037508,20037508,20037508",
"table": "(SELECT\n way,\n name,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')\n AND name IS NOT NULL\n) AS nature_reserve_text",
"table": "(SELECT\n way,\n name,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (boundary = 'national_park' OR leisure = 'nature_reserve' OR landuse = 'conservation')\n AND name IS NOT NULL\n) AS nature_reserve_text",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down
4 changes: 2 additions & 2 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ Layer:
boundary,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')
WHERE (boundary = 'national_park' OR leisure = 'nature_reserve' OR landuse = 'conservation')
AND building IS NULL
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
) AS national_park_boundaries
Expand Down Expand Up @@ -2153,7 +2153,7 @@ Layer:
name,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')
WHERE (boundary = 'national_park' OR leisure = 'nature_reserve' OR landuse = 'conservation')
AND name IS NOT NULL
) AS nature_reserve_text
properties:
Expand Down
Binary file modified symbols/orchard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified symbols/vineyard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5f76d2a

Please sign in to comment.