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

Landcover order #3441

Merged
merged 3 commits into from
Oct 28, 2018
Merged
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
10 changes: 6 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,15 @@ Layer:
('landuse_' || (CASE WHEN landuse IN ('forest', 'military', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow') 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
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,
way_area
FROM planet_osm_polygon
WHERE (landuse IN ('forest', 'military', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow')
OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland'))
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
AND building IS NULL
ORDER BY way_area DESC
) AS features
ORDER BY way_area DESC, feature
) AS landcover_low_zoom
properties:
minzoom: 7
Expand Down Expand Up @@ -137,7 +138,8 @@ Layer:
('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,
('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway,
CASE WHEN religion IN ('christian', 'jewish', 'muslim') THEN religion ELSE 'INT-generic'::text END AS religion,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,
way_area
FROM planet_osm_polygon
WHERE (landuse IS NOT NULL
OR leisure IS NOT NULL
Expand All @@ -153,8 +155,8 @@ Layer:
OR highway IN ('services', 'rest_area')
OR railway = 'station')
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
ORDER BY way_area DESC
) AS landcover
ORDER BY way_area DESC, feature
) AS features
properties:
minzoom: 10
Expand Down