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

Use ST_Boundary for admin-text & protected-areas-text #3948

Closed
wants to merge 1 commit into from
Closed
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 @@ -2136,12 +2136,13 @@ Layer:
<<: *osm2pgsql
table: |-
(SELECT
way,
ST_Boundary(way) as way,
name,
admin_level,
way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels
FROM planet_osm_polygon
WHERE boundary = 'administrative'
WHERE way && !bbox!
AND boundary = 'administrative'
AND admin_level IN ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10')
AND name IS NOT NULL
AND osm_id < 0
Expand All @@ -2156,13 +2157,14 @@ Layer:
<<: *osm2pgsql
table: |-
(SELECT
way,
ST_Boundary(way) as way,
name,
boundary,
tags->'protect_class' AS protect_class,
way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels
FROM planet_osm_polygon
WHERE (boundary IN ('aboriginal_lands', 'national_park')
WHERE way && !bbox!
AND (boundary IN ('aboriginal_lands', 'national_park')
OR leisure = 'nature_reserve'
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','24','97','98','99')))
AND name IS NOT NULL
Expand Down