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

support landuse=civic_admin and related landuse #4983

Closed
Closed
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
12 changes: 8 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ Layer:
FROM (SELECT
way,
('landuse_' || (CASE WHEN landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial',
'civic_admin', 'institutional', 'government', 'governmental',
'meadow', 'grass', 'village_green', 'vineyard', 'orchard') THEN landuse END)) AS landuse,
('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub') THEN "natural" END)) AS "natural",
('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE tags->'wetland' END) END)) AS wetland,
way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels,
way_area
FROM planet_osm_polygon
WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'village_green', 'vineyard', 'orchard')
WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'civic_admin', 'institutional', 'government', 'governmental',
'meadow', 'grass', 'village_green', 'vineyard', 'orchard')
OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub'))
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND building IS NULL
Expand Down Expand Up @@ -106,7 +108,8 @@ Layer:
('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass',
'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture',
'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial',
'brownfield', 'landfill', 'salt_pond', 'construction', 'plant_nursery', 'religious', 'flowerbed') THEN landuse END)) AS landuse,
'brownfield', 'landfill', 'salt_pond', 'construction', 'plant_nursery', 'religious', 'flowerbed',
'civic_admin', 'institutional', 'government', 'governmental') THEN landuse END)) AS landuse,
('shop_' || (CASE WHEN shop IN ('mall') AND (tags->'location' NOT IN ('underground') OR (tags->'location') IS NULL) THEN shop END)) AS shop,
('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'garden',
'golf_course', 'miniature_golf', 'sports_centre', 'stadium', 'pitch', 'ice_rink',
Expand Down Expand Up @@ -1606,8 +1609,9 @@ Layer:
AND (tags->'location' NOT IN ('roof', 'rooftop') OR NOT (tags ? 'location'))) THEN man_made END,
'landuse_' || CASE WHEN 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', 'salt_pond', 'military', 'plant_nursery') THEN landuse END,
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial',
'brownfield', 'landfill','construction', 'salt_pond', 'military', 'plant_nursery',
'civic_admin', 'institutional', 'government', 'governmental') THEN landuse END,
'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'cave_entrance') AND way_area IS NULL THEN "natural" END,
'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath',
'grassland', 'scrub', 'beach', 'glacier', 'tree', 'strait', 'cape', 'reef')
Expand Down
10 changes: 10 additions & 0 deletions style/amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,10 @@
[feature = 'man_made_water_works'],
[feature = 'man_made_wastewater_plant'],
[feature = 'landuse_commercial'],
[feature = 'landuse_civic_admin'],
[feature = 'landuse_institutional'],
[feature = 'landuse_government'],
[feature = 'landuse_governmental'],
[feature = 'landuse_brownfield'],
[feature = 'landuse_landfill'],
[feature = 'landuse_construction'],
Expand Down Expand Up @@ -2290,6 +2294,12 @@
[feature = 'landuse_commercial'] {
text-fill: darken(@commercial, 60%);
}
[feature = 'landuse_civic_admin'],
[feature = 'landuse_institutional'],
[feature = 'landuse_government'],
[feature = 'landuse_governmental'], {
text-fill: darken(@civic_admin, 60%);
}
[feature = 'landuse_brownfield'],
[feature = 'landuse_landfill'],
[feature = 'landuse_construction'] {
Expand Down
32 changes: 32 additions & 0 deletions style/landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
@retail-line: #d99c95; // Lch(70,25,30)
@commercial: #f2dad9; // Lch(89,8.5,25)
@commercial-line: #d1b2b0; // Lch(75,12,25)
@civic_admin: #00b8c7; // (also used for institutional, government, governmental
@civic_admin-line: #32a8e0;
@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)
Expand Down Expand Up @@ -492,6 +494,36 @@
}
}

[feature = 'landuse_civic_admin'],
[feature = 'landuse_institutional'],
[feature = 'landuse_government'],
[feature = 'landuse_governmental'] {
[zoom >= 14] {
a/line-width: 1;
a/line-offset: -0.5;
a/line-color: #0093D9;
a/line-opacity: 0.5;
a/line-join: round;
a/line-cap: round;
polygon-fill: @civic_admin;
polygon-opacity: 0.1;
[zoom >= 17] {
b/line-width: 4;
b/line-offset: -2;
b/line-color: @civic_admin-line;
b/line-opacity: 0.3;
b/line-join: round;
b/line-cap: round;

a/line-width: 2;
a/line-offset: -1;
b/line-width: 6;
b/line-offset: -3;
}
}
}


[feature = 'landuse_landfill'] {
[zoom >= 10] {
polygon-fill: #b6b592;
Expand Down
Loading