Skip to content

Commit 6ec9e31

Browse files
committed
Fix gravitystorm#996 by adding intermittent water bodies support
1 parent 05079f7 commit 6ec9e31

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

project.mml

+4-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,10 @@ Layer:
227227
waterway,
228228
landuse,
229229
name,
230-
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
230+
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,
231+
CASE WHEN tags->'intermittent' IN ('yes')
232+
OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season')
233+
THEN 'yes' ELSE 'no' END AS int_intermittent
231234
FROM planet_osm_polygon
232235
WHERE
233236
(waterway IN ('dock', 'riverbank')

symbols/intermittent_water.png

209 Bytes
Loading

water.mss

+16-5
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,23 @@
4747
[zoom >= 1][zoom < 2][way_pixels >= 16],
4848
[zoom >= 2][zoom < 8][way_pixels >= 32],
4949
[zoom >= 8] {
50-
polygon-fill: @water-color;
51-
[way_pixels >= 4] {
52-
polygon-gamma: 0.75;
50+
[int_intermittent = 'no'] {
51+
polygon-fill: @water-color;
52+
[way_pixels >= 4] {
53+
polygon-gamma: 0.75;
54+
}
55+
[way_pixels >= 64] {
56+
polygon-gamma: 0.6;
57+
}
5358
}
54-
[way_pixels >= 64] {
55-
polygon-gamma: 0.6;
59+
[int_intermittent = 'yes'] {
60+
polygon-pattern-file: url('symbols/intermittent_water.png');
61+
[way_pixels >= 4] {
62+
polygon-pattern-gamma: 0.75;
63+
}
64+
[way_pixels >= 64] {
65+
polygon-pattern-gamma: 0.6;
66+
}
5667
}
5768
}
5869
}

0 commit comments

Comments
 (0)