From 19cd28fe6d5129577f55c887bf18c1ebe1c3ff6f Mon Sep 17 00:00:00 2001 From: Joseph E <42757252+jeisenbe@users.noreply.github.com> Date: Fri, 25 Oct 2019 22:33:21 +0900 Subject: [PATCH 1/5] Create darker river-color for river & canal areas and ditch, drain, stream, canal & river lines Change river color to #8fcadd - Lch(78,21,227) The color of river, canal, ditch and drain lines is changed to `@river-color` in `#8fcadd` to be more visible over forest and other dark landcover areas. The color of river and canal areas is changed to match. This also improves mapper feedback about tagging of water areas Added a new intermittent_river.png pattern in the new river-color --- project.mml | 1 + style/style.mss | 4 +++- style/water.mss | 59 +++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 56 insertions(+), 8 deletions(-) diff --git a/project.mml b/project.mml index 912708c3aa..e5479214d0 100644 --- a/project.mml +++ b/project.mml @@ -232,6 +232,7 @@ Layer: (SELECT way, "natural", + water, waterway, landuse, way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels, diff --git a/style/style.mss b/style/style.mss index 6bb5b6aee5..7e3ee5d470 100644 --- a/style/style.mss +++ b/style/style.mss @@ -2,8 +2,10 @@ Map { background-color: @land-color; } -@water-color: #aad3df; @land-color: #f2efe9; +@water-color: #aad3df; +@river-color: #8fcadd; // Lch(78,21,227) + @standard-halo-radius: 1; @standard-halo-fill: rgba(255,255,255,0.6); diff --git a/style/water.mss b/style/water.mss index 84829eda3d..d335aaa4a5 100644 --- a/style/water.mss +++ b/style/water.mss @@ -18,10 +18,7 @@ } [waterway = 'dock'], - [landuse = 'basin'], - [natural = 'water'], - [landuse = 'reservoir'], - [waterway = 'riverbank'] { + [landuse = 'basin'] { [int_intermittent = 'no'] { polygon-fill: @water-color; [way_pixels >= 4] { polygon-gamma: 0.75; } @@ -33,6 +30,54 @@ [way_pixels >= 64] { polygon-pattern-gamma: 0.6; } } } + + [natural = 'water']::natural, + [landuse = 'reservoir']::landuse, + [waterway = 'riverbank']::waterway { + [zoom >= 0][zoom < 1][way_pixels >= 4], + [zoom >= 1][zoom < 2][way_pixels >= 16], + [zoom >= 2][zoom < 8][way_pixels >= 32], + [zoom >= 8] { + [water != 'river'][water != 'canal'][waterway != 'riverbank'] { + [int_intermittent = 'no'] { + polygon-fill: @water-color; + [way_pixels >= 4] { + polygon-gamma: 0.75; + } + [way_pixels >= 64] { + polygon-gamma: 0.6; + } + } + [int_intermittent = 'yes'] { + polygon-pattern-file: url('symbols/intermittent_water.png'); + polygon-pattern-alignment: global; + [way_pixels >= 4] { + polygon-pattern-gamma: 0.75; + } + [way_pixels >= 64] { + polygon-pattern-gamma: 0.6; + } + } + } + [natural = 'water'][water = 'river'], + [natural = 'water'][water = 'canal'], + [waterway = 'riverbank'] { + [int_intermittent = 'no'] { + polygon-fill: @river-color; + [way_pixels >= 4] { polygon-gamma: 0.75; } + [way_pixels >= 64] { polygon-gamma: 0.6; } + } + [int_intermittent = 'yes'] { + [zoom >= 15] { + polygon-pattern-file: url('symbols/intermittent_river.png'); + polygon-pattern-alignment: global; + [way_pixels >= 4] { polygon-pattern-gamma: 0.75; } + [way_pixels >= 64] { polygon-pattern-gamma: 0.6; } + } + } + } + } + } } #water-lines-casing { @@ -66,7 +111,7 @@ line-join: round; line-clip: false; } - line-color: @water-color; + line-color: @river-color; line-width: 0.7; [zoom >= 9] { line-width: 1.2; } [zoom >= 10] { line-width: 1.6; } @@ -96,7 +141,7 @@ } } - water/line-color: @water-color; + water/line-color: @river-color; water/line-width: 2; water/line-cap: round; water/line-join: round; @@ -154,7 +199,7 @@ background/line-color: @land-color; } water/line-width: 2; - water/line-color: @water-color; + water/line-color: @river-color; [bridge = 'yes'] { bridgecasing/line-color: black; From 5b519946d109e28b4a25b0792e8d39b4df84d28c Mon Sep 17 00:00:00 2001 From: jeisenbe Date: Mon, 27 Apr 2020 08:46:29 -0700 Subject: [PATCH 2/5] Create ocean-color #b9d3dc for salt water Adds @ocean-color: #b9d3dc - Lch(83,10,227), 5 lower chroma and 1 higher lightness than water-color --- style/landcover.mss | 2 +- style/shapefiles.mss | 2 +- style/style.mss | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/style/landcover.mss b/style/landcover.mss index e85f9c05a2..a8c78da760 100644 --- a/style/landcover.mss +++ b/style/landcover.mss @@ -77,7 +77,7 @@ ::high-zoom[zoom >= 12] { [feature = 'leisure_swimming_pool'][zoom >= 14] { - polygon-fill: @water-color; + polygon-fill: @ocean-color; [zoom >= 17] { line-width: 0.5; line-color: saturate(darken(@water-color, 20%), 20%); diff --git a/style/shapefiles.mss b/style/shapefiles.mss index 585cda6512..eca07f4287 100644 --- a/style/shapefiles.mss +++ b/style/shapefiles.mss @@ -13,7 +13,7 @@ #ocean-lz, #ocean { - polygon-fill: @water-color; + polygon-fill: @ocean-color; } #icesheet-poly { diff --git a/style/style.mss b/style/style.mss index 7e3ee5d470..639539e0a6 100644 --- a/style/style.mss +++ b/style/style.mss @@ -4,8 +4,9 @@ Map { @land-color: #f2efe9; -@water-color: #aad3df; -@river-color: #8fcadd; // Lch(78,21,227) +@water-color: #aad3df; // Lch(82,15,224) +@ocean-color: #b9d3dc; // Lch(83,10,227) +@river-color: #97c9d8; // Lch(78,18,225) @standard-halo-radius: 1; @standard-halo-fill: rgba(255,255,255,0.6); From a04f8706685b5e6a83559ee097078bda2eafdac1 Mon Sep 17 00:00:00 2001 From: jeisenbe Date: Mon, 27 Apr 2020 11:30:50 -0700 Subject: [PATCH 3/5] Adjust water colors to be slightly higher chroma, consistent hue @water-color: #a2d1e0; // Lch(81,17,227) @ocean-color: #b5d7e3; // Lch(84,13,227) @river-color: #8fcadd; // Lch(78,21,227) --- style/style.mss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/style/style.mss b/style/style.mss index 639539e0a6..de7f3fd1b7 100644 --- a/style/style.mss +++ b/style/style.mss @@ -4,9 +4,9 @@ Map { @land-color: #f2efe9; -@water-color: #aad3df; // Lch(82,15,224) -@ocean-color: #b9d3dc; // Lch(83,10,227) -@river-color: #97c9d8; // Lch(78,18,225) +@water-color: #a2d1e0; // Lch(81,17,227) +@ocean-color: #b5d7e3; // Lch(84,13,227) +@river-color: #8fcadd; // Lch(78,21,227) @standard-halo-radius: 1; @standard-halo-fill: rgba(255,255,255,0.6); From 4c2fc07feebfde065be870b98d2728f8fbf95a81 Mon Sep 17 00:00:00 2001 From: imagico Date: Tue, 8 Aug 2017 21:20:25 +0200 Subject: [PATCH 4/5] Fixing ferry routes over variable color water. This is not a perfect solution and depends on river color being the darkest but it seems to work all right even on ocean. --- style/ferry-routes.mss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/style/ferry-routes.mss b/style/ferry-routes.mss index 18748dd9b4..bff314f02b 100644 --- a/style/ferry-routes.mss +++ b/style/ferry-routes.mss @@ -4,8 +4,10 @@ #ferry-routes { [zoom >= 8] { /* background prevents problems with overlapping ferry-routes, see #457 */ - background/line-color: @water-color; + background/line-color: @river-color; background/line-width: 1; /* Needs to be a bit wider than the route itself because of antialiasing */ + background/line-comp-op: lighten; + background/line-dasharray: 4,4; line-color: @ferry-route; line-width: 0.4; line-dasharray: 4,4; From 99702fe058c52b9b8c626d5ca9215dfcb9dbf472 Mon Sep 17 00:00:00 2001 From: jeisenbe Date: Thu, 28 Jan 2021 22:02:19 -0800 Subject: [PATCH 5/5] Remove old pixel area filtering --- style/water.mss | 65 ++++++++++++++++++++----------------------------- 1 file changed, 26 insertions(+), 39 deletions(-) diff --git a/style/water.mss b/style/water.mss index d335aaa4a5..92ca6f84c8 100644 --- a/style/water.mss +++ b/style/water.mss @@ -34,46 +34,33 @@ [natural = 'water']::natural, [landuse = 'reservoir']::landuse, [waterway = 'riverbank']::waterway { - [zoom >= 0][zoom < 1][way_pixels >= 4], - [zoom >= 1][zoom < 2][way_pixels >= 16], - [zoom >= 2][zoom < 8][way_pixels >= 32], - [zoom >= 8] { - [water != 'river'][water != 'canal'][waterway != 'riverbank'] { - [int_intermittent = 'no'] { - polygon-fill: @water-color; - [way_pixels >= 4] { - polygon-gamma: 0.75; - } - [way_pixels >= 64] { - polygon-gamma: 0.6; - } - } - [int_intermittent = 'yes'] { - polygon-pattern-file: url('symbols/intermittent_water.png'); - polygon-pattern-alignment: global; - [way_pixels >= 4] { - polygon-pattern-gamma: 0.75; - } - [way_pixels >= 64] { - polygon-pattern-gamma: 0.6; - } - } + [water != 'river'][water != 'canal'][waterway != 'riverbank'] { + [int_intermittent = 'no'] { + polygon-fill: @water-color; + [way_pixels >= 4] { polygon-gamma: 0.75; } + [way_pixels >= 64] { polygon-gamma: 0.6; } } - [natural = 'water'][water = 'river'], - [natural = 'water'][water = 'canal'], - [waterway = 'riverbank'] { - [int_intermittent = 'no'] { - polygon-fill: @river-color; - [way_pixels >= 4] { polygon-gamma: 0.75; } - [way_pixels >= 64] { polygon-gamma: 0.6; } - } - [int_intermittent = 'yes'] { - [zoom >= 15] { - polygon-pattern-file: url('symbols/intermittent_river.png'); - polygon-pattern-alignment: global; - [way_pixels >= 4] { polygon-pattern-gamma: 0.75; } - [way_pixels >= 64] { polygon-pattern-gamma: 0.6; } - } + [int_intermittent = 'yes'] { + polygon-pattern-file: url('symbols/intermittent_water.png'); + polygon-pattern-alignment: global; + [way_pixels >= 4] { polygon-pattern-gamma: 0.75; } + [way_pixels >= 64] { polygon-pattern-gamma: 0.6; } + } + } + [natural = 'water'][water = 'river'], + [natural = 'water'][water = 'canal'], + [waterway = 'riverbank'] { + [int_intermittent = 'no'] { + polygon-fill: @river-color; + [way_pixels >= 4] { polygon-gamma: 0.75; } + [way_pixels >= 64] { polygon-gamma: 0.6; } + } + [int_intermittent = 'yes'] { + [zoom >= 15] { + polygon-pattern-file: url('symbols/intermittent_river.png'); + polygon-pattern-alignment: global; + [way_pixels >= 4] { polygon-pattern-gamma: 0.75; } + [way_pixels >= 64] { polygon-pattern-gamma: 0.6; } } } }