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

Fix #996 by adding intermittent water bodies support #3104

Merged
merged 1 commit into from
Mar 9, 2018
Merged
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
5 changes: 4 additions & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ Layer:
waterway,
landuse,
name,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,
CASE WHEN tags->'intermittent' IN ('yes')
OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season')
THEN 'yes' ELSE 'no' END AS int_intermittent
FROM planet_osm_polygon
WHERE
(waterway IN ('dock', 'riverbank')
Expand Down
Binary file added symbols/intermittent_water.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 16 additions & 5 deletions water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,23 @@
[zoom >= 1][zoom < 2][way_pixels >= 16],
[zoom >= 2][zoom < 8][way_pixels >= 32],
[zoom >= 8] {
polygon-fill: @water-color;
[way_pixels >= 4] {
polygon-gamma: 0.75;
[int_intermittent = 'no'] {
polygon-fill: @water-color;
[way_pixels >= 4] {
polygon-gamma: 0.75;
}
[way_pixels >= 64] {
polygon-gamma: 0.6;
}
}
[way_pixels >= 64] {
polygon-gamma: 0.6;
[int_intermittent = 'yes'] {
polygon-pattern-file: url('symbols/intermittent_water.png');
[way_pixels >= 4] {
polygon-pattern-gamma: 0.75;
}
[way_pixels >= 64] {
polygon-pattern-gamma: 0.6;
}
}
}
}
Expand Down