I am trying to create a line style that consists of 2 lines. The first line (red) is actual border and the second line is a thick transparent line that should align it's bottom edge to the first line. When I zoom enough in QGIS, these lines render correctly, but when zoomed out, you can see that thick line is not rendered correctly. Problem is present even when I export map to PDF. Is there any solution for this?

enter image description here

  • Have you tried using a join style other than miter?
    – csk
    Jan 29, 2018 at 19:14
  • yes, it didn't help. Jan 30, 2018 at 12:07

2 Answers 2


If you can change your layer to a polygon layer, you can use the "shapeburst fill" to reach this result. It is usually based on a gradient, but if you want a clear boundary like in your example, you can set up a gradient with a second stop colored like the initial value and a last value completely transparent. It can be applied to the inside of the polygon (by default) or the outside, using the "inverted polygon" rendering: Shapeburst fill

  • Unfortunately I cannot change layer to polygon, because there shouldn't be border on the coastline. Thank you for your answer, I learned something new :) Jan 28, 2018 at 18:13

You may want to try a single-sided buffer. Because it is a static layer it is not affected by our zooming in or out.

enter image description here

There are several tools in QGIS for single-sided buffer, e.g. [OGR] Single sided buffers (and offset lines) for lines, GRASS v.parallel, Virtual Layer: st_singlesidedbuffer(),...

One drawback is that you may not be able to make it much thicker. If the buffer size is too big, output gets funny. (Especially at around corners, kinks and narrow corridors).

enter image description here

  • 1
    That drawback is exactly what I want to avoid :) Jan 29, 2018 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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