Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering farmland earlier on midzoom #2722

Merged
merged 1 commit into from
Aug 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@

[feature = 'landuse_farmland'],
[feature = 'landuse_greenhouse_horticulture'] {
[zoom >= 10] {
[zoom >= 8] {
polygon-fill: @farmland;
[zoom >= 16] {
line-width: .5;
Expand Down
8 changes: 4 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ Layer:
COALESCE(wetland, landuse, "natural") AS feature
FROM (SELECT
way, COALESCE(name, '') AS name, religion,
('landuse_' || (CASE WHEN landuse IN ('forest', 'military') THEN landuse ELSE NULL END)) AS landuse,
('landuse_' || (CASE WHEN landuse IN ('forest', 'military', 'farmland') THEN landuse ELSE NULL END)) AS landuse,
('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') 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')
WHERE (landuse IN ('forest', 'military', 'farmland')
OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock'))
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND building IS NULL
Expand Down Expand Up @@ -1966,7 +1966,7 @@ Layer:
way,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,
COALESCE(
'landuse_' || CASE WHEN landuse IN ('forest', 'military') THEN landuse ELSE NULL END,
'landuse_' || CASE WHEN landuse IN ('forest', 'military', 'farmland') THEN landuse ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock') THEN "natural" ELSE NULL END,
'place_' || CASE WHEN place IN ('island') THEN place ELSE NULL END,
'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,
Expand All @@ -1975,7 +1975,7 @@ Layer:
name,
CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building -- always no with the where conditions
FROM planet_osm_polygon
WHERE (landuse IN ('forest', 'military')
WHERE (landuse IN ('forest', 'military', 'farmland')
OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock')
OR "place" IN ('island')
OR boundary IN ('national_park')
Expand Down