-
Notifications
You must be signed in to change notification settings - Fork 822
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing natural areas on z5+ (#3458)
- Loading branch information
Showing
4 changed files
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,21 +90,22 @@ Layer: | |
COALESCE(wetland, landuse, "natural") AS feature | ||
FROM (SELECT | ||
way, COALESCE(name, '') AS name, religion, | ||
('landuse_' || (CASE WHEN landuse IN ('forest', '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", | ||
('landuse_' || (CASE WHEN landuse IN ('forest', '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', '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(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels, | ||
way_area | ||
FROM planet_osm_polygon | ||
WHERE (landuse IN ('forest', '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 | ||
WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', '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 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
szymone
|
||
AND building IS NULL | ||
) AS features | ||
ORDER BY way_area DESC, feature | ||
) AS landcover_low_zoom | ||
properties: | ||
minzoom: 7 | ||
minzoom: 5 | ||
maxzoom: 9 | ||
- id: landcover | ||
geometry: polygon | ||
|
@@ -214,7 +215,7 @@ Layer: | |
file: data/antarctica-icesheet-polygons-3857/icesheet_polygons.shp | ||
type: shape | ||
properties: | ||
minzoom: 8 | ||
minzoom: 5 | ||
- id: water-areas | ||
geometry: polygon | ||
<<: *extents | ||
|
@@ -270,15 +271,15 @@ Layer: | |
ORDER BY COALESCE(layer,0), way_area DESC | ||
) AS landcover_area_symbols | ||
properties: | ||
minzoom: 8 | ||
minzoom: 5 | ||
- id: icesheet-outlines | ||
geometry: linestring | ||
<<: *extents | ||
Datasource: | ||
file: data/antarctica-icesheet-outlines-3857/icesheet_outlines.shp | ||
type: shape | ||
properties: | ||
minzoom: 8 | ||
minzoom: 5 | ||
- id: springs | ||
geometry: point | ||
<<: *extents | ||
|
@@ -547,7 +548,7 @@ Layer: | |
AND building IS NULL | ||
) AS landuse_overlay | ||
properties: | ||
minzoom: 7 | ||
minzoom: 8 | ||
- id: tourism-boundary | ||
geometry: polygon | ||
<<: *extents | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why 1 has been changed to 0.01? As part of index optimization 0.01 has been replaced with 1 in this commit: 41939bc. Why now this change has been reverted, but only in this single line? And it's still in the latest version.