After my previous posts on flow maps, many people asked me how to create the curved arrows that you see in these maps.
Arrow symbol layers were introduced in QGIS 2.16.
The following quick screencast shows how it is done. Note how additional nodes are added to make the curved arrows:
Today’s post was motivated by a question following up on my recent post “Details of good flow maps“: How to create arrows with gradients from transparent to opaque?
The key idea is to use a gradient fill to color the arrows:
It all seems perfectly straightforward: determine the direction of the line and set the gradient rotation according to the line direction.
But wait! That doesn’t work!
The issue is that all default angle functions available in expressions return clockwise angles but the gradient rotation has to be set in counter-clockwise angles. So we need this expression: