Skip to content

Commit

Permalink
Add rendering of man_made=wastewater_plant, water_works (#3376)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamant36 authored and kocio-pl committed Sep 13, 2018
1 parent 98b534b commit 2e21690
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 12 deletions.
11 changes: 9 additions & 2 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,8 @@
[feature = 'man_made_tower'][zoom >= 17],
[feature = 'man_made_communications_tower'][zoom >= 17],
[feature = 'man_made_water_tower'][zoom >= 17],
[feature = 'man_made_chimney'][zoom >= 17] {
[feature = 'man_made_chimney'][zoom >= 17],
[feature = 'man_made_waste_water_plant'][zoom >= 17] {
text-name: "[name]";
text-size: @standard-font-size;
text-wrap-width: @standard-wrap-width;
Expand All @@ -1817,7 +1818,9 @@
[feature = 'man_made_tower'],
[feature = 'man_made_communications_tower'],
[feature = 'man_made_water_tower'],
[feature = 'man_made_chimney'] {
[feature = 'man_made_chimney'],
[feature = 'man_made_water_works'],
[feature = 'man_made_wastewater_plant'] {
text-dy: 10;
}
text-face-name: @standard-font;
Expand Down Expand Up @@ -2058,6 +2061,8 @@
[feature = 'landuse_industrial'],
[feature = 'landuse_railway'],
[feature = 'man_made_works'],
[feature = 'man_made_water_works'],
[feature = 'man_made_wastewater_plant'],
[feature = 'landuse_commercial'],
[feature = 'landuse_brownfield'],
[feature = 'landuse_landfill'],
Expand Down Expand Up @@ -2155,6 +2160,8 @@
}
[feature = 'landuse_industrial'],
[feature = 'landuse_railway'],
[feature = 'man_made_wastewater_plant'],
[feature = 'man_made_water_works'],
[feature = 'man_made_works'] {
text-fill: darken(@industrial, 60%);
}
Expand Down
36 changes: 34 additions & 2 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
@retail-line: #d99c95; // Lch(70,25,30)
@commercial: #f2dad9; // Lch(89,8.5,25)
@commercial-line: #d1b2b0; // Lch(75,12,25)
@industrial: #ebdbe8; // Lch(89,9,330) (Also used for railway)
@industrial-line: #c6b3c3; // Lch(75,11,330) (Also used for railway-line)
@industrial: #ebdbe8; // Lch(89,9,330) (Also used for railway, wastewater_plant)
@industrial-line: #c6b3c3; // Lch(75,11,330) (Also used for railway-line, wastewater_plant-line)
@farmland: #eef0d5; // Lch(94,14,112)
@farmland-line: #c7c9ae; // Lch(80,14,112)
@farmyard: #f5dcba; // Lch(89,20,80)
Expand Down Expand Up @@ -56,6 +56,10 @@
@quarry: #c5c3c3;
@military: #f55;
@beach: #fff1ba;
@wastewater_plant: @industrial;
@wastewater_plant-line: @industrial-line;
@water_works: @industrial;
@water_works-line: @industrial-line;

// --- Sports ---

Expand Down Expand Up @@ -393,6 +397,34 @@
}
}

[feature = 'man_made_wastewater_plant'] {
polygon-fill: @industrial;
[zoom >= 15] {
polygon-fill: @wastewater_plant;
}
[zoom >= 16] {
line-width: 0.5;
line-color: @wastewater_plant-line;
[name != ''] {
line-width: 0.7;
}
}
}

[feature = 'man_made_water_works'] {
polygon-fill: @industrial;
[zoom >= 15] {
polygon-fill: @water_works;
}
[zoom >= 16] {
line-width: 0.5;
line-color: @water_works-line;
[name != ''] {
line-width: 0.7;
}
}
}

[feature = 'landuse_railway'][zoom >= 10] {
polygon-fill: @railway;
[zoom >= 16][name != ''] {
Expand Down
20 changes: 12 additions & 8 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Layer:
('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden',
'golf_course', 'miniature_golf', 'sports_centre', 'stadium', 'pitch',
'track', 'dog_park', 'fitness_station') THEN leisure ELSE NULL END)) AS leisure,
('man_made_' || (CASE WHEN man_made IN ('works') THEN man_made ELSE NULL END)) AS man_made,
('man_made_' || (CASE WHEN man_made IN ('works', 'wastewater_plant', 'water_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 @@ -145,7 +145,7 @@ Layer:
OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'taxi', 'university', 'college', 'school', 'hospital', 'kindergarten',
'grave_yard', 'place_of_worship', 'prison', 'clinic', 'ferry_terminal', 'marketplace', 'community_centre', 'social_facility',
'arts_centre', 'parking_space', 'bus_station', 'fire_station', 'police')
OR man_made IN ('works')
OR man_made IN ('works', 'wastewater_plant','water_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 @@ -2221,7 +2221,8 @@ Layer:
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland',
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill',
'construction', 'military', 'plant_nursery', 'religious') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works', 'communications_tower', 'chimney')
'man_made_' || CASE WHEN (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works',
'communications_tower', 'chimney', 'wastewater_plant', 'water_works')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) 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,
Expand Down Expand Up @@ -2266,15 +2267,16 @@ Layer:
FROM planet_osm_polygon
-- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering
WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome')
OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'wilderness_hut', 'guest_house', 'apartment', 'camp_site', 'caravan_site', 'theme_park',
'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site')
OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'wilderness_hut', 'guest_house', 'apartment',
'camp_site', 'caravan_site', 'theme_park', 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site')
OR amenity IS NOT NULL -- skip checking a huge list and use a null check
OR tags->'advertising' IN ('column')
OR shop IS NOT NULL
OR (tags->'office') IS NOT NULL
OR leisure IS NOT NULL
OR landuse IS NOT NULL
OR (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works', 'communications_tower', 'chimney')
OR (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works',
'communications_tower', 'chimney', 'wastewater_plant', 'water_works')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
Expand Down Expand Up @@ -2390,7 +2392,8 @@ 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', 'tower', 'water_tower', 'obelisk', 'works', 'communications_tower', 'chimney')
'man_made_' || CASE WHEN (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'obelisk', 'works',
'communications_tower', 'chimney', 'wastewater_plant', 'water_works')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) 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')
Expand Down Expand Up @@ -2454,7 +2457,8 @@ 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', 'tower', 'water_tower', 'cross', 'obelisk', 'works', 'communications_tower', 'chimney')
OR (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'cross', 'obelisk', 'works',
'communications_tower', 'chimney', 'wastewater_plant', 'water_works')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IS NOT NULL
OR waterway IN ('waterfall')
Expand Down

0 comments on commit 2e21690

Please sign in to comment.