diff --git a/amenity-points.mss b/amenity-points.mss index 62c67fb5cf..0762ba015a 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -700,24 +700,6 @@ text-placement: interior; } - [feature = 'natural_wood'][is_building = 'no'] { - [zoom >= 8][way_pixels > 3000], - [zoom >= 17] { - text-name: "[name]"; - 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(@wood, 40%); - text-face-name: @landcover-face-name; - 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; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } - text-placement: interior; - } - } - [feature = 'natural_peak'], [feature = 'natural_volcano'] { [zoom >= 13] { @@ -1129,6 +1111,7 @@ } } + [feature = 'natural_wood'][is_building = 'no'], [feature = 'landuse_forest'][is_building = 'no'] { [zoom >= 8][way_pixels > 3000], [zoom >= 17] { @@ -1136,10 +1119,10 @@ 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(@forest, 30%); + text-fill: @forest-text; text-face-name: @landcover-face-name; text-halo-radius: 1; - text-halo-fill: rgba(255,255,255,0.6); + text-halo-fill: @forest-text-halo; text-wrap-width: @landcover-wrap-width-size; [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } diff --git a/landcover.mss b/landcover.mss index b940c78550..893761554d 100644 --- a/landcover.mss +++ b/landcover.mss @@ -1,10 +1,11 @@ // --- Parks, woods, other green things --- -@forest: #a0cf85; +@forest: #b2d6a3; // Lch(82,30,135) +@forest-text: #4e843e; // Lch(50,45,135) (mix of @forest and polygon-pattern) +@forest-text-halo: #d0f5c1; // Lch(92.8, 30, 135) @grass: #cfeca8; // also meadow, common, garden, village_green, conservation @golf_course: #b5e3b5; @park: #cdf7c9; // also recreation_ground -@wood: #aed1a0; @vineyard: #b3e2a8; @grassland: #c6e4b4; @@ -250,18 +251,13 @@ } } - [feature = 'landuse_forest'] { + [feature = 'landuse_forest'], + [feature = 'natural_wood'] { [zoom >= 8] { polygon-fill: @forest; [way_pixels >= 4] { polygon-gamma: 0.75; } [way_pixels >= 64] { polygon-gamma: 0.3; } } - [zoom >= 14] { - polygon-pattern-file: url('symbols/forest.png'); - [way_pixels >= 4] { polygon-pattern-gamma: 0.75; } - [way_pixels >= 64] { polygon-pattern-gamma: 0.3; } - } - } [feature = 'landuse_farmyard'][zoom >= 10] { @@ -377,14 +373,6 @@ } } - [feature = 'natural_wood'] { - [zoom >= 8] { - polygon-fill: @wood; - [way_pixels >= 4] { polygon-gamma: 0.75; } - [way_pixels >= 64] { polygon-gamma: 0.3; } - } - } - [feature = 'natural_bare_rock'][zoom >= 9] { polygon-fill: @bare_ground; [way_pixels >= 4] { polygon-gamma: 0.75; } @@ -546,13 +534,18 @@ } #landuse-overlay { - [landuse = 'military'][zoom >= 10]::landuse { + [feature = 'military'][zoom >= 10] { polygon-pattern-file: url('symbols/military_red_hatch.png'); polygon-pattern-alignment: global; line-color: @military; line-width: 3; line-opacity: 0.329; } + [feature = 'forest'][zoom >= 12] { + polygon-pattern-file: url('symbols/forest.png'); // Lch(50,60,135) + polygon-pattern-alignment: global; + opacity: 0.6; // The entire layer has opacity in case of overlapping forests + } } #cliffs { diff --git a/project.mml b/project.mml index 802a0acf2a..39e4e9dfee 100644 --- a/project.mml +++ b/project.mml @@ -525,7 +525,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, landuse, leisure\n FROM planet_osm_polygon\n WHERE (landuse = 'military') AND building IS NULL\n) AS landuse_overlay", + "table": "(SELECT\n way, COALESCE(landuse, CASE WHEN \"natural\" = 'wood' THEN 'forest' END) AS feature\n FROM planet_osm_polygon\n WHERE (landuse IN ('military', 'forest') OR \"natural\" = 'wood')\n AND building IS NULL\n) AS landuse_overlay", "geometry_field": "way", "type": "postgis", "key_field": "", diff --git a/project.yaml b/project.yaml index c8f2f7e53e..4304b948f5 100644 --- a/project.yaml +++ b/project.yaml @@ -503,9 +503,10 @@ Layer: <<: *osm2pgsql table: |- (SELECT - way, landuse, leisure + way, COALESCE(landuse, CASE WHEN "natural" = 'wood' THEN 'forest' END) AS feature FROM planet_osm_polygon - WHERE (landuse = 'military') AND building IS NULL + WHERE (landuse IN ('military', 'forest') OR "natural" = 'wood') + AND building IS NULL ) AS landuse_overlay advanced: {} - id: "line-barriers" diff --git a/symbols/forest.png b/symbols/forest.png old mode 100644 new mode 100755 index d6d50c9c42..e30a62b930 Binary files a/symbols/forest.png and b/symbols/forest.png differ