Skip to content

Commit

Permalink
Render landuse with grass color from z5 instead of z10 (#3701)
Browse files Browse the repository at this point in the history
* Add landuse=grass to landcover-low-zoom

* Render landuse=village_green from z5 instead of z10
  • Loading branch information
vholten authored and imagico committed Apr 4, 2019
1 parent 1c3f0b1 commit f8dcb1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@

[feature = 'natural_grassland'][zoom >= 5],
[feature = 'landuse_meadow'][zoom >= 5],
[feature = 'landuse_grass'][zoom >= 10],
[feature = 'landuse_village_green'][zoom >= 10] {
[feature = 'landuse_grass'][zoom >= 5],
[feature = 'landuse_village_green'][zoom >= 5] {
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 @@ -93,13 +93,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', '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', '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
Expand Down

0 comments on commit f8dcb1f

Please sign in to comment.