Skip to content

Commit

Permalink
Rendering man_made=works outline
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Sep 12, 2017
1 parent 415e4f0 commit 2f70135
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,14 @@
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'man_made_works'][zoom >= 16] {
line-width: .5;
line-color: @industrial-line;
[name != ''] {
line-width: 0.7;
}
}

[feature = 'landuse_railway'][zoom >= 10] {
polygon-fill: @railway;
[zoom >= 16][name != ''] {
Expand Down
4 changes: 3 additions & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Layer:
table: |-
(SELECT
way, name, religion, way_pixels,
COALESCE(aeroway, amenity, wetland, power, landuse, leisure, military, "natural", tourism, highway, railway) AS feature
COALESCE(aeroway, amenity, wetland, power, landuse, leisure, man_made, military, "natural", tourism, highway, railway) AS feature
FROM (SELECT
way, COALESCE(name, '') AS name,
('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,
Expand All @@ -138,6 +138,7 @@ Layer:
('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden',
'golf_course', 'miniature_golf', 'picnic_table', 'fitness_centre', 'sports_centre', 'stadium', 'pitch',
'track', 'dog_park') THEN leisure ELSE NULL END)) AS leisure,
('man_made_' || (CASE WHEN man_made IN ('works') THEN man_made ELSE NULL END)) AS man_made,
('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,
('natural_' || (CASE WHEN "natural" IN ('beach', 'shoal', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" ELSE NULL END)) AS "natural",
('wetland_' || (CASE WHEN "natural" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN "natural" IN ('marsh', 'mud') THEN "natural" ELSE tags->'wetland' END) ELSE NULL END)) AS wetland,
Expand All @@ -153,6 +154,7 @@ Layer:
OR aeroway IN ('apron', 'aerodrome')
OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten',
'grave_yard', 'place_of_worship', 'prison', 'clinic', 'ferry_terminal')
OR man_made IN ('works')
OR military IN ('danger_area')
OR "natural" IN ('beach', 'shoal', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')
OR power IN ('station', 'sub_station', 'substation', 'generator')
Expand Down

0 comments on commit 2f70135

Please sign in to comment.