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

[WIP] Render natural=water (lakes, lagoons) differently when tagged salt=yes. #3901

Closed
wants to merge 2 commits into from
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
4 changes: 3 additions & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ Layer:
CASE WHEN tags->'intermittent' IN ('yes')
OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season')
OR tags->'basin' IN ('detention', 'infiltration')
THEN 'yes' ELSE 'no' END AS int_intermittent
THEN 'yes' ELSE 'no' END AS int_intermittent,
CASE WHEN tags->'salt' IN ('yes') THEN 'yes' ELSE 'no' END AS int_salt
FROM planet_osm_polygon
WHERE
(waterway IN ('dock', 'riverbank')
Expand Down Expand Up @@ -1524,6 +1525,7 @@ Layer:
ELSE 'other' END AS shop,
CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building,
tags -> 'operator' AS operator,
CASE WHEN tags->'salt' IN ('yes') THEN 'yes' ELSE 'no' END AS int_salt,
ref,
way_area,
COALESCE(way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0), 0) AS way_pixels
Expand Down
6 changes: 6 additions & 0 deletions water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
[zoom >= 8] {
[int_intermittent = 'no'] {
polygon-fill: @water-color;
[natural = 'water'][int_salt = 'yes'] {
polygon-pattern-file: url('symbols/salt-dots-2.png');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
}
[way_pixels >= 4] {
polygon-gamma: 0.75;
}
Expand Down