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

Add Shading for places defined as areas #2806

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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
23 changes: 21 additions & 2 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,25 @@
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'place_village'],
[feature = 'place_hamlet'] {
[zoom >= 10] {
polygon-fill: @built-up-lower-lowzoom;
polygon-opacity: 0.3;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use opacity.

Copy link
Author

@stevenLAD stevenLAD Sep 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As already said - the intention in using opacity was to not obfuscate finer detail. This can be removed if preferred.
Please remove if required or advise how I should proceed to remove so as not to cloud the pull. Thanks

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given my basic concerns with rendering places like built up areas I'm not sure what changes you should make, except you need to find a way without opacity.

[zoom >= 11] { polygon-fill: @built-up-upper-lowzoom; }
[zoom >= 13] { polygon-fill: @residential; }
[zoom >= 16] {
line-width: .5;
line-color: @residential-line;
[name != ''] {
line-width: 0.7;
}
}
}
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'landuse_garages'][zoom >= 13] {
polygon-fill: @garages;
[way_pixels >= 4] { polygon-gamma: 0.75; }
Expand Down Expand Up @@ -474,7 +493,7 @@
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace noise

Copy link
Author

@stevenLAD stevenLAD Sep 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has already been removed as part of a whitespace cleanup which I understood had been merged

[feature = 'wetland_swamp'][zoom >= 8] {
polygon-fill: @forest;
[way_pixels >= 4] { polygon-gamma: 0.75; }
Expand Down Expand Up @@ -766,7 +785,7 @@
b/line-color: @tourism;
b/line-opacity: 0.3;
b/line-join: round;
b/line-cap: round;
b/line-cap: round;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whicespace noise

Copy link
Author

@stevenLAD stevenLAD Sep 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has already been removed as part of a whitespace cleanup which I understood had been merged

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it shouldn't be in this PR as well.

}
[zoom >= 17] {
a/line-width: 2;
Expand Down
6 changes: 4 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Layer:
'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture',
'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial',
'brownfield', 'landfill', 'construction', 'plant_nursery') THEN landuse ELSE NULL END)) AS landuse,
('place_' || (CASE WHEN place IN ('village', 'hamlet') THEN place ELSE NULL END)) AS place,
('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,
Expand All @@ -149,6 +150,7 @@ Layer:
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (landuse IS NOT NULL
OR place IN ('village','hamlet')
OR leisure IS NOT NULL
OR aeroway IN ('apron', 'aerodrome')
OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten',
Expand Down Expand Up @@ -1905,7 +1907,7 @@ Layer:
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') 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,
'place_' || CASE WHEN place IN ('island', 'islet', 'village', 'hamlet') THEN place ELSE NULL END,
'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site')
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
Expand Down Expand Up @@ -1934,7 +1936,7 @@ Layer:
OR landuse IS NOT NULL
OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk')
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
OR place IN ('island', 'islet', 'village', 'hamlet')
OR military IN ('danger_area')
OR historic IN ('memorial', 'monument', 'archaeological_site')
OR tags->'memorial' IN ('plaque')
Expand Down