When i wrote about rendering of footways/cycleways in OpenStreetMap based maps recently i indicated there are other changes i made in the alternative-colors style that deserve some more detailed explanation and here i am going to introduce some of them related to waterbody rendering.
Waterbodies in the standard style (and similarlys in nearly all other OSM based maps) have always been rendered in a relatively simple, not to say crude way. Every water related feature is drawn in the same color, water areas traditionally starting at z6, river lines at z8 and streams and smaller artificial waterways at z13. The z8 and z13 thresholds are so firmly established that mappers often decide how to tag waterways specifically to accommodate these thresholds. Since the smaller artificial waterways (ditch and drain) are rendered slightly thinner than streams these tags are frequently abused to map smaller natural waterways. The only significant styling specialty in this traditional framework is that the small waterways starting at z13 get a bright casing so they are better visible on dark backgrounds.
Some time ago a change was introduced to render intermittent waterways with a dashed line. While this seems like a logical styling decision it turned out to work rather badly because of the problems of dashed line styles in combination with detailed geometries as i already explained in context of the footway rendering.
This is the situation that forms the basis of the changes i am going to write about here.
Differentiating waterbody types
As indicated above traditionally the OSM standard style renders all water features in the same color. This color was changed some time ago but it is still one single color that is used for everything – from the ocean to the smallest streams and ditches.
This all one color scheme does not require mappers to think about how they map waterbodies specifically, they can just paint the map blue so to speak. In particular with water area tagging this has lead to a lot of arbitrariness and relatively low data quality in the more detailed, more specific information. As i pointed out in the context of waterbody data use the data cannot really be used for much else than for painting waterbodies in a uniform color. At the same time this makes life very easy for map designers of these relatively simple maps since you don’t have to worry about drawing order or other difficulties.
More specific information about waterbodies would however be very useful for data users so it makes sense to render it to encourage mappers to be more diligent with recording such information. And differentiating different types of waterbodies can help a lot creating a better readable map since what color and styling works best varies depending on the type of waterbody. And since blue color is widely reserved for water related features anyway differentiating by color is well possible.
The basic three types of waterbodies i am differentiating are:
- the ocean
- standing inland waterbodies (primarily lakes)
- flowing water (both line and polygon features)
Water colors for ocean (left) standing inland water (middle) and flowing water (right)
This coloring scheme is also visible in the low zoom demo i showed recently.
Rivers use the strongest and darkest color so they are well visible even on strong and structured background while the ocean uses a brighter color not to be too dominating over land colors given that it covers a large area.
visibility of darker river color on dark background
differentiating standing and flowing water at the Rhine
In addition to differentiating by physical type of waterbody for line features i also distinguish between natural and artificial waterways in a relatively subtle form using a slightly brighter blue centerline at the higher zoom levels.
canal rendering with subtly brighter centerline
drain and stream rendering at z18 in comparison
Use of subtlety is of fundamental importance if you want to create a rich map that it still well readable. This distinction between natural and artificial waterways is strong enough to be clearly recognized by the keen observer but at the same time it is not adding a lot of noise that would affect the readability of the map otherwise.
Intermittency of waterbodies
current rendering in the standard style of intermittent rivers at z10
As indicated above the standard style already differentiates intermittent waterways but not in a very good way. I tested various options and ultimately came up with the following approach
- intermittent waterways start one zoom level later and are slightly thinner than perennial ones at the first zoom levels.
- at z12-z13 intermittent rivers get a bright color centerline. This is fairly well visible and works much better with detailed geometries than dashing. At z14 and above i use dashing for rivers but with very small gaps between the dashes so the line it still well visible as a continuous geometry. Streams, ditches and drains are rendered with a similar dashing from z13 upwards.
- intermittent standing water areas get a blue grain pattern with a transparent base so underlying landcover rendering is visible.
- intermittent flowing water areas get a bright grain pattern on a blue base starting at z14. This ensures the geometry outline is still well visible which is fairly important for readability in case of riverbanks.
intermittent waterway rendering at z13 with bright centerline for rivers and dashing for streams
intermittent riverbank polygons at z15 in combination with intermittent streams and rivers
intermittent lakes at z10
In addition for waterbodies with salt water (salt=yes) the ocean color is used in combination with a weak bright grain pattern. An abstract demo of all of these together here:
intermittent water rendering in the alternative-colors style at z14 – click to see the z15 version
In addition to the more fundamental changes described above i also did a lot of tuning for the line widths and other rendering parameters for a more balanced relationship between the different feature types and a more continuous change in appearance when zooming in or out.
Not directly connected to the waterbody changes but still somewhat related – i added rendering of fords. These are shown in the standard style as POIs with an icon starting at z16 which is a fairly unfortunate way of rendering them because:
- the icon covers the most interesting and most important area of the actual crossing.
- the icon is rendered for anything that is tagged ford=yes – this can be a big highway or a small footway – or anything else for that matter where the ford tag does not make any sense.
- z16 is way too late to be of help to the map user in many cases.
POI rendering of fords – a lot of visual noise carrying very little useful information
In other words: This kind of rendering in many situations does not really improve the map.
I used a different approach by rendering fords similar to bridges – after all a ford is a highway crossing a waterway without a bridge. The difficulty is that fords can be tagged on a node while bridges are by convention always mapped as ways. Rendering node based fords similar to bridges requires quite a bit of effort and i am afraid this significantly adds to the already complex road code. But i think the visual results make it worth it.
fords mapped as nodes for footways, tracks and minor roads
As you can see this is usually intuitively recognizable as a ford and the crossing geometry is not obscured by a big and distracting icon.
ford rendering at z15 for various highway types – click for z16 version