Skip to content

Commit

Permalink
Adding vineyard and orchard to the low zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Oct 18, 2018
1 parent f564666 commit 1d4a551
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
}

[feature = 'landuse_vineyard'] {
[zoom >= 10] {
[zoom >= 5] {
polygon-fill: @orchard;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
Expand All @@ -148,7 +148,7 @@
}

[feature = 'landuse_orchard'] {
[zoom >= 10] {
[zoom >= 5] {
polygon-fill: @orchard;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
Expand Down
5 changes: 3 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ Layer:
COALESCE(wetland, landuse, "natural") AS feature
FROM (SELECT
way, COALESCE(name, '') AS name, religion,
('landuse_' || (CASE WHEN landuse IN ('forest', 'military', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow') THEN landuse ELSE NULL END)) AS landuse,
('landuse_' || (CASE WHEN landuse IN ('forest', 'military', 'farmland', 'residential', 'commercial', 'retail', 'industrial',
'meadow', 'vineyard', 'orchard') THEN landuse ELSE NULL END)) AS landuse,
('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland') 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(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (landuse IN ('forest', 'military', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow')
WHERE (landuse IN ('forest', 'military', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'vineyard', 'orchard')
OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland'))
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND building IS NULL
Expand Down

0 comments on commit 1d4a551

Please sign in to comment.