Skip to content

Commit

Permalink
Merge pull request #2700 from kocio-pl/manmade-works-name
Browse files Browse the repository at this point in the history
Rendering man_made=works
  • Loading branch information
kocio-pl authored Sep 15, 2017
2 parents 3453068 + 2f70135 commit 7dd108b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,7 @@
[feature = 'landuse_retail'],
[feature = 'landuse_industrial'],
[feature = 'landuse_railway'],
[feature = 'man_made_works'],
[feature = 'landuse_commercial'],
[feature = 'landuse_brownfield'],
[feature = 'landuse_landfill'],
Expand Down Expand Up @@ -1602,7 +1603,8 @@
text-fill: darken(@retail, 50%);
}
[feature = 'landuse_industrial'],
[feature = 'landuse_railway'] {
[feature = 'landuse_railway'],
[feature = 'man_made_works'] {
text-fill: darken(@industrial, 60%);
}
[feature = 'landuse_commercial'] {
Expand Down
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
12 changes: 7 additions & 5 deletions 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 Expand Up @@ -1930,7 +1932,7 @@ Layer:
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland',
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill',
'construction', 'military', 'plant_nursery') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath',
'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END,
'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,
Expand Down Expand Up @@ -1960,7 +1962,7 @@ Layer:
OR shop IS NOT NULL
OR leisure IS NOT NULL
OR landuse IS NOT NULL
OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk')
OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works')
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
OR military IN ('danger_area')
Expand Down Expand Up @@ -2062,7 +2064,7 @@ Layer:
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland',
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill',
'construction', 'military', 'plant_nursery') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk') THEN man_made ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk', 'works') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring',
'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree')
THEN "natural" ELSE NULL END,
Expand Down Expand Up @@ -2106,7 +2108,7 @@ Layer:
OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential',
'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture',
'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military', 'plant_nursery')
OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk')
OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk', 'works')
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
OR military IN ('danger_area')
Expand Down

0 comments on commit 7dd108b

Please sign in to comment.