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

Adding rendering for boundary=protected_area [WIP] #2830

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 4 additions & 2 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,8 @@
[feature = 'natural_wood'],
[feature = 'landuse_forest'],
[feature = 'boundary_national_park'],
[feature = 'leisure_nature_reserve'] {
[feature = 'leisure_nature_reserve'],
[feature = 'boundary_protected_area'] {
[zoom >= 8][way_pixels > 3000][is_building = 'no'],
[zoom >= 17] {
text-name: "[name]";
Expand Down Expand Up @@ -1420,7 +1421,8 @@
text-fill: @forest-text;
}
[feature = 'boundary_national_park'],
[feature = 'leisure_nature_reserve'] {
[feature = 'leisure_nature_reserve'],
[feature = 'boundary_protected_area'] {
text-fill: darken(@park, 70%);
}
}
Expand Down
16 changes: 8 additions & 8 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ Layer:
boundary,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')
WHERE (boundary = 'national_park' OR leisure = 'nature_reserve' OR boundary = 'protected_area')
AND building IS NULL
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
) AS national_park_boundaries
Expand Down Expand Up @@ -1871,7 +1871,7 @@ Layer:
'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,
'boundary_' || CASE WHEN boundary IN ('national_park', 'protected_area') THEN boundary ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('nature_reserve') THEN leisure ELSE NULL END
) AS feature,
name,
Expand All @@ -1880,7 +1880,7 @@ Layer:
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')
OR boundary IN ('national_park', 'protected_area')
OR leisure IN ('nature_reserve'))
AND building IS NULL
AND name IS NOT NULL
Expand Down Expand Up @@ -1939,7 +1939,7 @@ Layer:
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
ELSE NULL END,
'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator') THEN highway ELSE NULL END,
'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,
'boundary_' || CASE WHEN boundary IN ('national_park', 'protected_area') THEN boundary ELSE NULL END,
'waterway_' || CASE WHEN waterway IN ('dam', 'dock') THEN waterway ELSE NULL END,
'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END
) AS feature,
Expand Down Expand Up @@ -1968,7 +1968,7 @@ Layer:
OR tags->'memorial' IN ('plaque')
OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator')
OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')
OR boundary IN ('national_park')
OR boundary IN ('national_park', 'protected_area')
OR waterway IN ('dam', 'dock'))
AND (name IS NOT NULL
OR (ref IS NOT NULL AND aeroway IN ('gate'))
Expand Down Expand Up @@ -2072,7 +2072,7 @@ Layer:
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
ELSE NULL END,
'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator') THEN highway ELSE NULL END,
'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,
'boundary_' || CASE WHEN boundary IN ('national_park', 'protected_area') THEN boundary ELSE NULL END,
'waterway_' || CASE WHEN waterway IN ('dam', 'weir', 'dock') THEN waterway ELSE NULL END,
'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END,
Expand Down Expand Up @@ -2114,7 +2114,7 @@ Layer:
OR tags->'memorial' IN ('plaque')
OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator')
OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')
OR boundary IN ('national_park')
OR boundary IN ('national_park', 'protected_area')
OR waterway IN ('dam', 'weir', 'dock'))
AND (name IS NOT NULL
OR (tags?'ele' AND ("natural" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter'))
Expand Down Expand Up @@ -2247,7 +2247,7 @@ Layer:
name,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')
WHERE (boundary = 'national_park' OR leisure = 'nature_reserve' OR boundary = 'protected_area')
AND name IS NOT NULL
) AS nature_reserve_text
properties:
Expand Down