If rivers are roads…
A simple map showing rivers as roads and vice versa in Agusan del Sur, Philippines
1. Getting your roads and rivers
Use the QuickOSM plug-in and download highway and waterways. This will extract all the roads and waterways from OpenStreetMap.
Once the layers are downloaded, select your road layer > press Ctrl + k > type ef clip > clip with your land layer. This will directly clip the road layer instead of creating a new clipped layer. This is useful when you have a long-standing project and want to edit a layer without changing it to avoid updating all your layouts.
2. Tapering your “rivers”
Tapering a river layer means making it look realistic with the water coming from a watershed, flowing through a river which is naturally wider than its tributaries, and all waterways tapering to its end.
But what you will taper here is a road network which do not taper to its end and does not come from a “roadshed”. Each road maintains the same width in majority of its length but there is a road classification with primary roads being wider to secondary roads just like rivers to streams.
You can do this using the Geometry Generator symbology which is a powerful tool that for analysis and cartography.
Filter first your roads to only use select type of roads. I used trunk, primary, secondary, and tertiary because these are the roads that are usually interconnected. Dissolve it by type and create a new field named order and use this expression:
CASE
WHEN "highway" = 'trunk' then 0
WHEN "highway" = 'primary' then 1
WHEN "highway" = 'secondary' then 2
ELSE 3
END
When it’s filtered, change the road layer’s Symbol layer type to Geometry Generator > add this expression:
segments_to_lines($geometry)
Then go to Simple line and change the Stroke width’s value to :
CASE
WHEN "order" = 3 THEN .15
WHEN "order" = 2 THEN .3
WHEN "order" = 1 THEN .5
ELSE .8
END
* ( 1- (@geometry_part_num / @geometry_part_count ))
I got this from Anita Graser’s post on the topic. Here is a comparison of the roads styled as rivers and roads styled as roads.
3. Styling your “roads”
Naturally, rivers do not follow a straight line unlike roads. If you initially style it as a road by making it gray or black, it will still look like a group of rivers and streams.
You first need to “straighten” out the rivers to make them look more like roads. To do this, use the Simplify tool. I forgot what Tolerance value I used but you can start at 10 meters.
Then, style your straightened rivers to look like roads. You can copy this style. I only showed the river and stream features of the river layer. Also, enable Symbol Levels and put a higher value on the river features.
You can see me on LinkedIn and Twitter, and sometimes on OpenStreetMap, and GitHub when I’m productive.