From 8db68ada90917f375b7ce327556c74b82637e6de Mon Sep 17 00:00:00 2001 From: Penegal Date: Fri, 9 Mar 2018 13:25:38 +0100 Subject: [PATCH] Fix #996 by adding intermittent water bodies support (#3104) --- project.mml | 5 ++++- symbols/intermittent_water.png | Bin 0 -> 209 bytes water.mss | 21 ++++++++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 symbols/intermittent_water.png diff --git a/project.mml b/project.mml index e721f224cf..4ca9c4d6e1 100644 --- a/project.mml +++ b/project.mml @@ -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') diff --git a/symbols/intermittent_water.png b/symbols/intermittent_water.png new file mode 100644 index 0000000000000000000000000000000000000000..53abc925fa4736cca930ff1e5c44ac25324bf286 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI z1_r((Aj~*bn@<`j$X?><>&pI!nT=gUk7>zIE1-~UW=KSdbAE1aYF-JD%fR4Vl$uzQ znxasiS(2gP?&%wlqL<1J6gTyBaSVw#{PvO|BhYRJgAMgUuOtp=2sJnB9^Ulsx8Vzx j!gTe~DWM4fX#qQi literal 0 HcmV?d00001 diff --git a/water.mss b/water.mss index 33850f7dc6..08349de53f 100644 --- a/water.mss +++ b/water.mss @@ -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; + } } } }