Skip to content

Commit

Permalink
Fix #996 by adding intermittent water bodies support (#3104)
Browse files Browse the repository at this point in the history
  • Loading branch information
Penegal authored and kocio-pl committed Mar 9, 2018
1 parent 3ab1df8 commit 8db68ad
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
5 changes: 4 additions & 1 deletion project.mml
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
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
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

0 comments on commit 8db68ad

Please sign in to comment.