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

Add aboriginal areas #3521

Merged
merged 7 commits into from
Jan 29, 2019
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
24 changes: 22 additions & 2 deletions admin.mss
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,14 @@ overlapping borders correctly.
text-dy: -10;
}

#nature-reserve-text[zoom >= 13][way_pixels > 192000] {
#protected-areas-text[zoom >= 13][way_pixels > 192000] {
text-name: "[name]";
text-face-name: @book-fonts;
text-fill: green;
[boundary='aboriginal_lands'],
[boundary='protected_area'][protect_class='24'] {
text-fill: @aboriginal;
}
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
text-largest-bbox-only: false;
Expand All @@ -236,17 +240,25 @@ overlapping borders correctly.
text-dy: -10;
}

#nature-reserve-boundaries {
#protected-areas {
[way_pixels > 3000] {
[zoom >= 8][zoom < 10] {
::fill {
opacity: 0.05;
polygon-fill: green;
[boundary='aboriginal_lands'],
[boundary='protected_area'][protect_class='24'] {
polygon-fill: @aboriginal;
}
}
::outline {
opacity: 0.25;
line-width: 1.2;
line-color: green;
[boundary='aboriginal_lands'],
[boundary='protected_area'][protect_class='24'] {
line-color: @aboriginal;
}
[zoom >= 9] {
line-width: 1.5;
}
Expand All @@ -258,6 +270,10 @@ overlapping borders correctly.
line-width: 3.6;
line-offset: -0.9;
line-color: green;
[boundary='aboriginal_lands'],
[boundary='protected_area'][protect_class='24'] {
line-color: @aboriginal;
}
line-join: round;
line-cap: round;
[zoom >= 12] {
Expand All @@ -273,6 +289,10 @@ overlapping borders correctly.
opacity: 0.15;
line-width: 1.8;
line-color: green;
[boundary='aboriginal_lands'],
[boundary='protected_area'][protect_class='24'] {
line-color: @aboriginal;
}
line-join: round;
line-cap: round;
[zoom >= 12] {
Expand Down
5 changes: 5 additions & 0 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@barrier-icon: #3f3f3f;
@landform-color: #d08f55;
@leisure-green: darken(@park, 60%);
@aboriginal: #82643a;
@religious-icon: #000000;

@landcover-font-size: 10;
Expand Down Expand Up @@ -2287,6 +2288,7 @@
[feature = 'landuse_forest'],
[feature = 'boundary_national_park'],
[feature = 'leisure_nature_reserve'],
[feature = 'boundary_aboriginal_lands'],
[feature = 'boundary_protected_area'] {
[zoom >= 8][way_pixels > 3000][is_building = 'no'],
[zoom >= 17] {
Expand All @@ -2311,6 +2313,9 @@
[feature = 'landuse_military'] {
text-fill: darken(@military, 40%);
}
[feature = 'boundary_aboriginal_lands'] {
text-fill: @aboriginal;
}
[feature = 'natural_wood'],
[feature = 'landuse_forest'] {
text-fill: @forest-text;
Expand Down
41 changes: 23 additions & 18 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ Layer:
) AS power_line
properties:
minzoom: 14
- id: nature-reserve-boundaries
- id: protected-areas
geometry: polygon
<<: *extents
Datasource:
Expand All @@ -1241,14 +1241,15 @@ Layer:
way,
name,
boundary,
tags->'protect_class' AS protect_class,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (boundary = 'national_park'
WHERE (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','97','98','99')))
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
) AS national_park_boundaries
) AS protected_areas
properties:
minzoom: 8
- id: trees
Expand Down Expand Up @@ -2063,7 +2064,8 @@ Layer:
'natural_' || CASE WHEN "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock',
'water', 'bay', 'strait', 'cape') THEN "natural" ELSE NULL END,
'place_' || CASE WHEN place IN ('island') THEN place ELSE NULL END,
'boundary_' || CASE WHEN boundary IN ('national_park')
'boundary_' || CASE WHEN (boundary = 'protected_area' AND tags->'protect_class' = '24') THEN 'aboriginal_lands'
WHEN boundary IN ('aboriginal_lands', 'national_park')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','97','98','99'))
THEN boundary ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('nature_reserve') THEN leisure ELSE NULL END
Expand All @@ -2075,8 +2077,8 @@ Layer:
OR military IN ('danger_area')
OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water', 'bay', 'strait', 'cape')
OR "place" IN ('island')
OR boundary IN ('national_park')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','97','98','99'))
OR boundary IN ('aboriginal_lands', 'national_park')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','24','97','98','99'))
OR leisure IN ('nature_reserve'))
AND building IS NULL
AND name IS NOT NULL
Expand Down Expand Up @@ -2147,7 +2149,8 @@ Layer:
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle', 'manor', 'city_gate')
THEN historic 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')
'boundary_' || CASE WHEN (boundary = 'protected_area' AND tags->'protect_class' = '24') THEN 'aboriginal_lands'
WHEN boundary IN ('aboriginal_lands', 'national_park')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','97','98','99'))
THEN boundary ELSE NULL END,
'waterway_' || CASE WHEN waterway IN ('dam', 'dock') THEN waterway ELSE NULL END,
Expand Down Expand Up @@ -2218,8 +2221,8 @@ Layer:
OR historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle', 'manor', 'city_gate')
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 = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','97','98','99'))
OR boundary IN ('aboriginal_lands', 'national_park')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','24','97','98','99'))
OR waterway IN ('dam', 'dock'))
AND (name IS NOT NULL
OR (ref IS NOT NULL AND aeroway IN ('gate'))
Expand Down Expand Up @@ -2351,8 +2354,8 @@ Layer:
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle', 'manor', 'city_gate')
THEN historic 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')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','97','98','99'))
'boundary_' || CASE WHEN boundary IN ('aboriginal_lands', 'national_park')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','24','97','98','99'))
THEN boundary ELSE NULL END,
'waterway_' || CASE WHEN waterway IN ('dam', 'weir', 'dock') THEN waterway ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END,
Expand Down Expand Up @@ -2424,8 +2427,8 @@ Layer:
OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross', 'fort', 'wayside_shrine', 'castle', 'manor', 'city_gate')
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 = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','97','98','99'))
OR boundary IN ('aboriginal_lands', 'national_park')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6','7','24','97','98','99'))
OR waterway IN ('dam', 'weir', 'dock'))
AND (name IS NOT NULL
OR (tags?'ele' AND ("natural" IN ('peak', 'volcano', 'saddle')
Expand Down Expand Up @@ -2555,7 +2558,7 @@ Layer:
) AS admin_text
properties:
minzoom: 16
- id: nature-reserve-text
- id: protected-areas-text
geometry: linestring
<<: *extents
Datasource:
Expand All @@ -2564,13 +2567,15 @@ Layer:
(SELECT
way,
name,
boundary,
tags->'protect_class' AS protect_class,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (boundary = 'national_park'
WHERE (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','97','98','99')))
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
) AS nature_reserve_text
) AS protected_areas_text
properties:
minzoom: 13
- id: amenity-low-priority
Expand Down