waterway=riverbank and water=river should be distinguished from lakes, reservoirs, ponds and other non-flowing water bodieswater=* tagsnatural=waterThis issue blocks merging PR #3670 to fix #3513 and possibly #3647
Question is if we _want_ a riverline to be visible in a lake. Getting the riverline through is important for waterway routability, not necessarily nice visual rendering.
Displaying river lines over water areas would provide mapper feedback about the geometry, but it would not meet expectations about how a map should look, and it might encourage mappers to remove waterways within lakes, so I would not recommend this.
Fortunately, water lines are now rendered under water areas (since v4.21.0), so we can now change the river color without having rivers appear over water areas.
There's some discussion on the related issue #3895 about how it will look where a river meets the ocean (or lake). Here are some examples from Hamburg (you'll need to enlarge to full size):
z13 current

z13 after changing river color

z14 Hamburg current

z14 Hamburg after

z14 southeast current

z14 southeast after

z15 Alster current

z15 Alster after

z18 Alster current

z18 Alster after

z17 Tiefstackschleuse canal lock comparison

z16 Elbe river coastline transit before

z16 Elbe river/coastline after

z16 Elbe river/coastline aerial imagery in iD

z15 after

Comparisons in Luxembourg:
z13 Luxembourg city before

z13 city after - rivers in new river-color

z13 Rural luxembourg before

z13 rural after

z13 Lac de la Haute Sure before

z13 Lac after

z16 dam side of lake before

z16 dam after

z17 river inlet of lake before

z17 inlet after

Some rivers in Wales:
z15 after - coastline transit here shares a way with the national park boundary

z17 Afon Rhythallt river and lake - before

z17 after

z15 river-lake before

z15 after

z16 Afon Glaslyn river mouth before

z16 after

z14 Afon Seiont in Caernarfon before

z14 after

z16 Afon Seiont before

z16 after

Reference to a discussion about oceans - see https://github.com/gravitystorm/openstreetmap-carto/issues/3895#issuecomment-538640710: rendering sharp borders between water areas is introducing artifacts for me, so I'm against simple adding colors, I guess using smooth transition would be enough to avoid it.
Dark rivers are needed only on low/midzoom, because they are rendered as thin lines there, so we could use color progress (the higher zoom level, the lighter color).
BTW - are there any salt rivers? It would be good to test #3901 (white dots overlay) with such a dark color.
River and stream lines should be a darker and more visible blue color than lakes and seas, so that they can be seen at low zoom levels when over dark landcover like forests.
What about other waterways, like canals or ditches? (see https://taginfo.openstreetmap.org/keys/waterway#values)
Yes, the other water lines also have the same problems, but they are most
noticeable with natural watercourses. They should all get the darker color
In the rendering examples, waterway=canal, =ditch and =drain are also
rendered on the darker, more saturated river color, and water=canal is
rendered like waterway=riverbank areas too.
Great, could you please update the ticket name/description with general "waterways" then?
I guess waterway zoom progression lightening might be especially important in Japany or Holland, since they have a lot of rivers and canals - could you test a dark version of a Tokyo area and Amsterdam area?


could you please update the ticket name/description
Done. I added "canals".
The problem is not so visible with the narrow linear waterways, since they are only mapped as lines, not areas, and they have a light color casing. However, they should also have their color changed to match rivers and canals at first.
(In the future we should develop a subtle distinction between streams and ditches/drains, but that isn't part of this issue.)
waterway zoom progression lightening might be especially important in Japan or Holland, since they have a lot of rivers and canals - could you test a dark version of a Tokyo area [link to z9] and Amsterdam area [link to z13]?
I can test the z13 area in the Netherlands, but my laptop only has 6 GB of ram, so I don't think I can import the whole z9 Tokyo area.
Since the current water color is not faded at low zoom levels, I don't think it's necessary to introduce multiple different colors for water at different zoom levels. This makes it harder to read the map and difficult to develop a map key/legend.
Also, remember that I want to merge PR #3670 which will remove the color fading from z12 and lower, so in the future z9 to z11 should look more similar to the current z13 and z12 rendering. This will make it unnecessary to fade colors at low zoom levels - instead the different landcover colors would be combined. But the water colors should still be distinguished:
1) there will only be 3 (very similar) blue colors used for water: this is still less than the proposed number of green landcover colors for low zoom
2) The darker river/canal color will still be needed at low zoom level, if the fading is removed, so that rivers can be seen over woodland areas
3) The different colors are very subtle at low zoom level. It's often not noticeable unless you are looking for it, since the rivers and lakes are smaller. For example, I couldn't see where this river to lake transition was at first, until I zoomed in, and this is only z13; lower zoom levels are even more subtle:

Since the current water color is not faded at low zoom levels, I don't think it's necessary to introduce multiple different colors for water at different zoom levels. This makes it harder to read the map and difficult to develop a map key/legend.
This works good for special buildings, I see no problem with that.
However this is just the idea at the moment to prevent unnecessary dark river color at high zoom - it's not needed for water type distinction nor the current river color is unclear there.
This will make it unnecessary to fade colors at low zoom levels
I mean making river color fading from low (dark blue) to high zoom (close to a current blue), not the other way around.
I can test the z13 area in the Netherlands, but my laptop only has 6 GB of ram, so I don't think I can import the whole z9 Tokyo area.
Sorry, I forgot to test it on German fork - they have strong roads, but Tokyo area rivers look OK for me:

It seems that Amsterdam is tagged in some other way, since in this area the waterways color seems to be not darken:

Here is one of the larger countries with fairly complete landcover mapping which my laptop can render at z8. This is the first level where river lines are shown.
z8 current - Latvia

z8 with darker rivers (2 water colors)

z8 with darker rivers and lighter ocean (3 water colors)

z8 with darker rivers and 4 landcover colors (after PR #3670) - ocean same as lakes

z8 with darker rivers, lighter ocean and 4 landcover colors (PR #3670 + issue #3895)

Thanks for another example. Rivers look OK in every case, 4 landcover colors look bad for me in both cases (too strong high vegetation green).
Also the ocean looks good only with 2-color water version, it's bad (too pale) when light and I even a current version looks weak in comparison.
z10 before

z10 river-color and new water-color

z10 river and water color and 4 colors for landcover (but oceans same as lakes)

z10 three colors for water, current landcover fading

z10 three colors for water and 4 landcover colors

z13 before

z13 new river-color and water-color

z13 three water colors

FYI, the german style is using slightly different colors than those tested above. They use:
@water-color: #aad3df; // Lch(82,15,224)
@ocean-color: #b9d3dc; // Lch(83,10,227)
@river-color: #97c9d8; // Lch(78,18,225)
See https://github.com/giggls/openstreetmap-carto-de/blob/master/style.mss
But I have been testing:
@water-color: #a2d1e0; // Lch(81,17,227)
@ocean-color: #b5d7e3; // Lch(84,13,227)
@river-color: #8fcadd; // Lch(78,21,227)
Main differences are that the tested river-color has higher chroma (and saturation), and the ocean-color is a little lighter but also a little higher chroma.
Following up comments in the related issue (https://github.com/gravitystorm/openstreetmap-carto/issues/3895#issuecomment-538903860 and @kocio-pl mentioning trying less contrast), here are tests with oceans similar to the current water-color, but lakes in a new color intermediate between the new river-color and the new ocean-color. This is gives quite low contrast between each step; I don't think it would be possible to make the colors any more similar and still distinguish lakes from rivers.
@ocean-color: #aad3e0; // Lch(82,15,227)
@water-color: #9dcede; // Lch(80,18,227)
@river-color: #8fcadd; // Lch(78,21,227)


z15 Ardalstangen Norway, current

z15 low contrast water colors

z15 low contrast water colors with 2px gradient around coastline

z15 previously tests water colors (same as alt-colors style)

z14 Utla river - lake transition - current

z14 lake low contrast

z14 lake high contrast (alt-colors)

z15 Utla river - lake transition - current

z15 lake low contrast

z15 lake higher contrast (alt-colors)


z13 Daugava river mouth (Riga, Latvia) - before

after - Lower contrast

Previous test (higher contrast)

lower contrast with gradient outline

Previous colors with gradient outline

It seems that the outline makes more of a difference than the slightly different ocean color.
Generally speaking i am not a fan of compromises between showing something and not showing something (a.k.a. fading) or between differentiating things and not differentiating things.
Are there actually any cases where you think the color scheme you now tried works better than the one tested before? And i of course mean that _the difference between different types of waterbodies is less visible_ is not an advantage.
As a general rule: When things are shown in different colors but the color difference is not readable map readability is decreased because the color differences - even if not readable - lead to poorer identifiability and less clear color relationships with other colors in the map.
Are there actually any cases where you think the color scheme you now tried works better than the one tested before?
No.
However, it succeeded in getting us to consensus on @river-color: #8fcadd; // Lch(78,21,227) - see https://github.com/gravitystorm/openstreetmap-carto/issues/3895#issuecomment-540133740 - so now we can start with adding the new river-color, and then work on adjusting the ocean and lake color further in another PR.
I think we might still need to make the ocean a touch lighter, and perhaps lakes can also be lighter to increase the contrast between lakes and rivers.
Reopened by #3955
@kocio-pl requested a summary of the reasons for showing rivers differently than lakes in a comment on closed PR #3930 - I think this is a more helpful place to discuss the general issue.
As mentioned above, there are 3 main reasons to show rivers differently than other water bodies:
1) River and stream lines need to be more visible so that they can be seen at low zoom levels when over dark landcover like forests. Rivers and other waterways are long and narrow, which makes it harder to follow them than large water areas like lakes or the seas. For the same reason, river areas should be darker and the same color as river/stream lines
2) Areas of waterway=riverbank and water=river should be distinguished from lakes, reservoirs, ponds and other non-flowing water bodies.
This makes the map more legible by clearly distinguishing waterways (like rivers, canals) from lakes and seas. Since waterways need to be darker/higher contrast with landcover, due to point 1 above, lakes can be a bit lighter and less chroma.
3) Mappers should get feedback about river areas that are missing water=* tags.
In the past waterway=riverbank was the standard way to map all rivers, but now a number of editors are using natural=water, so water=river needs to be added. This can be easy to forget, so mappers need visual feedback from this style to make sure that the tag isn't missing from some segments of a river.
In https://github.com/gravitystorm/openstreetmap-carto/pull/3930#issuecomment-546932374 @kocio-pl wrote:
I have proposed 3 different solutions and 2 of them preserves original 3-color proposition, I think this is quite a lot of constructive feedback.
Could you please point to the specific suggestions?
Is there a way in CartoCSS to blend the colors of two polygons together where they meet, like the last X amount of pixel along the side where they join or something, or is that not possible?
No, this is not possible and is also quite unlikely to be implemented because it would be computationally expensive. What has been shown so far as examples here are one sided edge gradients of the coastline that depend on using the coastline line data set in addition to the coastline polygon data.
And as said - deliberately blurring geometries that have been placed by mappers with consideration and where accurate positioning is of significance for data users would clash with the goals of this style.
Most helpful comment
Displaying river lines over water areas would provide mapper feedback about the geometry, but it would not meet expectations about how a map should look, and it might encourage mappers to remove waterways within lakes, so I would not recommend this.
Fortunately, water lines are now rendered under water areas (since v4.21.0), so we can now change the river color without having rivers appear over water areas.