I would like to put direction arrows next to my Water system just like in OpenTopoMap (see the image under).

Screenshot from Opentopomap

I already watched the source code but they made it with Mapnik. However, I am working on my maps in QGIS.

In QGIS there are arrows line. I can put it next to my flow, but they are stick one after the another. I would like to have separated arrows by a certain distance.

1 Answer 1


You can achieve this result with styling.

Take the water line layer style and add a new symbol layer, select marker line and display it on central point

enter image description here

Select the marker layer, select the arrow symbol (at this point you can also import another svg symbol if the default arrow doesn't suit your needs), set its color. Beside the rotation setting, click the data defined override button / edit and enter the following equation, which compute the line angle at the center of the line.

line_interpolate_angle(  $geometry , $length /2)

EDIT thanks to @J.R comment, you can just put 90 instead of computing the angle

enter image description here

At last, select the simple marker layer and put an adequate offset, maybe 2 mm

enter image description here

  • 2
    If you need to have equally spaced marker just choose the "with interval" radio button and set the interval. Also you dont need to set the rotation with a formula, the symbol should follow the curvature of your line (if your arrow is perpendicular to your line set the rotation to 90 or -90 to point in the right direction). Also dont forget to set a line offset to display the arrow on the side of the line.
    – J.R
    Commented Sep 27, 2018 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.