Skip to content

Commit

Permalink
code cleanup #3521
Browse files Browse the repository at this point in the history
more code cleanup

more code cleanup
  • Loading branch information
almccon committed Jan 29, 2019
1 parent a3f0c27 commit 8b2c536
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
10 changes: 5 additions & 5 deletions admin.mss
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ overlapping borders correctly.
text-face-name: @book-fonts;
text-fill: green;
[boundary='aboriginal_lands'],
[class='24'] {
[boundary='protected_area'][protect_class='24'] {
text-fill: @aboriginal;
}
text-halo-radius: @standard-halo-radius;
Expand All @@ -247,7 +247,7 @@ overlapping borders correctly.
opacity: 0.05;
polygon-fill: green;
[boundary='aboriginal_lands'],
[class='24'] {
[boundary='protected_area'][protect_class='24'] {
polygon-fill: @aboriginal;
}
}
Expand All @@ -256,7 +256,7 @@ overlapping borders correctly.
line-width: 1.2;
line-color: green;
[boundary='aboriginal_lands'],
[class='24'] {
[boundary='protected_area'][protect_class='24'] {
line-color: @aboriginal;
}
[zoom >= 9] {
Expand All @@ -271,7 +271,7 @@ overlapping borders correctly.
line-offset: -0.9;
line-color: green;
[boundary='aboriginal_lands'],
[class='24'] {
[boundary='protected_area'][protect_class='24'] {
line-color: @aboriginal;
}
line-join: round;
Expand All @@ -290,7 +290,7 @@ overlapping borders correctly.
line-width: 1.8;
line-color: green;
[boundary='aboriginal_lands'],
[class='24'] {
[boundary='protected_area'][protect_class='24'] {
line-color: @aboriginal;
}
line-join: round;
Expand Down
4 changes: 1 addition & 3 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
@aboriginal: #82643a;
@religious-icon: #000000;


@landcover-font-size: 10;
@landcover-wrap-width-size: 30; // 3 em
@landcover-line-spacing-size: -1.5; // -0.15 em
Expand Down Expand Up @@ -2314,8 +2313,7 @@
[feature = 'landuse_military'] {
text-fill: darken(@military, 40%);
}
[feature = 'boundary_aboriginal_lands'],
[feature = 'boundary_protected_area'] {
[feature = 'boundary_aboriginal_lands'] {
text-fill: @aboriginal;
}
[feature = 'natural_wood'],
Expand Down
19 changes: 8 additions & 11 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1241,13 +1241,12 @@ Layer:
way,
name,
boundary,
tags->'protect_class' AS class,
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 = 'aboriginal_lands'
OR boundary = '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')))
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','24','97','98','99')))
AND building IS NULL
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
) AS protected_areas
Expand Down Expand Up @@ -2065,7 +2064,6 @@ 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 = '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'))
Expand Down Expand Up @@ -2570,13 +2568,12 @@ Layer:
way,
name,
boundary,
tags->'protect_class' AS class,
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 = 'aboriginal_lands'
OR boundary = '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')))
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','24','97','98','99')))
AND name IS NOT NULL
) AS protected_areas_text
properties:
Expand Down

0 comments on commit 8b2c536

Please sign in to comment.