From 53f5329920e22470b39b2e1d351d228850a558e0 Mon Sep 17 00:00:00 2001 From: vholten Date: Tue, 27 Nov 2018 10:47:41 +0100 Subject: [PATCH 1/2] Add landuse=grass to landcover-low-zoom --- landcover.mss | 2 +- project.mml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/landcover.mss b/landcover.mss index 50b0b2c3df..43f8d696f1 100644 --- a/landcover.mss +++ b/landcover.mss @@ -358,7 +358,7 @@ [feature = 'natural_grassland'][zoom >= 5], [feature = 'landuse_meadow'][zoom >= 5], - [feature = 'landuse_grass'][zoom >= 10], + [feature = 'landuse_grass'][zoom >= 5], [feature = 'landuse_village_green'][zoom >= 10] { polygon-fill: @grass; [way_pixels >= 4] { polygon-gamma: 0.75; } diff --git a/project.mml b/project.mml index eff3b073a0..77331a14cd 100644 --- a/project.mml +++ b/project.mml @@ -91,13 +91,13 @@ Layer: FROM (SELECT way, ('landuse_' || (CASE WHEN landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', - 'meadow', 'vineyard', 'orchard') THEN landuse ELSE NULL END)) AS landuse, + 'meadow', 'grass', 'vineyard', 'orchard') THEN landuse ELSE NULL END)) AS landuse, ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub') THEN "natural" ELSE NULL END)) AS "natural", ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE tags->'wetland' END) ELSE NULL END)) AS wetland, way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels, way_area FROM planet_osm_polygon - WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'vineyard', 'orchard') + WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'vineyard', 'orchard') OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub')) AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real AND building IS NULL From 4ff429726ad37a3ad75e268adc5c888e139e52e3 Mon Sep 17 00:00:00 2001 From: vholten Date: Sun, 31 Mar 2019 16:34:14 +0200 Subject: [PATCH 2/2] Render landuse=village_green from z5 instead of z10 --- landcover.mss | 2 +- project.mml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/landcover.mss b/landcover.mss index 43f8d696f1..f87140b9a8 100644 --- a/landcover.mss +++ b/landcover.mss @@ -359,7 +359,7 @@ [feature = 'natural_grassland'][zoom >= 5], [feature = 'landuse_meadow'][zoom >= 5], [feature = 'landuse_grass'][zoom >= 5], - [feature = 'landuse_village_green'][zoom >= 10] { + [feature = 'landuse_village_green'][zoom >= 5] { polygon-fill: @grass; [way_pixels >= 4] { polygon-gamma: 0.75; } [way_pixels >= 64] { polygon-gamma: 0.3; } diff --git a/project.mml b/project.mml index 77331a14cd..6d53d33298 100644 --- a/project.mml +++ b/project.mml @@ -91,13 +91,13 @@ Layer: FROM (SELECT way, ('landuse_' || (CASE WHEN landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', - 'meadow', 'grass', 'vineyard', 'orchard') THEN landuse ELSE NULL END)) AS landuse, + 'meadow', 'grass', 'village_green', 'vineyard', 'orchard') THEN landuse ELSE NULL END)) AS landuse, ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub') THEN "natural" ELSE NULL END)) AS "natural", ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE tags->'wetland' END) ELSE NULL END)) AS wetland, way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels, way_area FROM planet_osm_polygon - WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'vineyard', 'orchard') + WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'village_green', 'vineyard', 'orchard') OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub')) AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real AND building IS NULL