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

Optimize Z9 rendering #645

Merged
merged 1 commit into from
Mar 4, 2023
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
4 changes: 2 additions & 2 deletions base.mss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
polygon-gamma: 0.75;
}

#landuse_gen0[zoom>1][zoom<=9],
#landuse_gen1[zoom>9][zoom<=12],
#landuse_gen0[zoom>1][zoom<=8],
#landuse_gen1[zoom>8][zoom<=12],
#landuse[zoom>=13] {
[type='amenity_grave_yard'],
[type='landuse_cemetery'] {
Expand Down
12 changes: 9 additions & 3 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Layer:
CASE WHEN "natural" IS NOT NULL THEN ('natural_' || "natural") ELSE NULL END,
CASE WHEN leisure IS NOT NULL THEN ('leisure_' || leisure) ELSE NULL END,
CASE WHEN amenity IS NOT NULL THEN ('amenity_' || amenity) ELSE NULL END,
CASE WHEN highway IN ('pedestrian') THEN ('highway_' || highway) ELSE NULL END
CASE WHEN highway IS NOT NULL THEN ('highway_' || highway) ELSE NULL END
) AS type,
sport
FROM planet_osm_polygon
Expand All @@ -102,7 +102,7 @@ Layer:
geometry: polygon
properties:
minzoom: 2
maxzoom: 9
maxzoom: 8
- id: landuse_gen1
<<: *extents
Datasource:
Expand All @@ -129,12 +129,13 @@ Layer:
OR highway IN ('pedestrian')
)
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
AND way && !bbox!
ORDER BY way_area DESC
) AS data
geometry: polygon
properties:
cache-features: true
minzoom: 10
minzoom: 9
maxzoom: 12
- id: landuse
<<: *extents
Expand Down Expand Up @@ -182,6 +183,7 @@ Layer:
("natural" = 'wood' OR landuse = 'forest')
AND building IS NULL
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
AND way && !bbox!
ORDER BY way_area DESC
) AS data
geometry: polygon
Expand Down Expand Up @@ -336,6 +338,7 @@ Layer:
OR landuse in ('basin', 'reservoir')
)
AND way_area > 0.1*!pixel_width!::real*!pixel_height!::real
AND way && !bbox!
AND (tunnel IS NULL OR tunnel NOT IN ('yes', 'culvert'))
) AS data
geometry: polygon
Expand Down Expand Up @@ -363,6 +366,7 @@ Layer:
OR landuse in ('basin', 'reservoir')
)
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
AND way && !bbox!
AND (tunnel IS NULL OR tunnel NOT IN ('yes', 'culvert'))
) AS data
geometry: polygon
Expand Down Expand Up @@ -924,6 +928,7 @@ Layer:
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','24','97','98','99')))
AND building IS NULL
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
AND way && !bbox!
) AS protected_areas
properties:
cache-features: true
Expand Down Expand Up @@ -1920,6 +1925,7 @@ Layer:
(landuse = 'military' OR military = 'danger_area')
AND building IS NULL
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
AND way && !bbox!
ORDER BY way_area DESC
) AS data
geometry: polygon
Expand Down