8

I try to make a candy cane style for a line geometry with QGIS I used the hatching and line symbology but the hach are squared.

Have you one better idea to do:

  • a more smooth and rounded symbology
  • the hatches limited by the line itself

enter image description here

1 Answer 1

21

The symbol is from multiple parts:

  1. A white 5mm Simple Line as base, using a round join style.

  2. On top of that: A Hashed Line using an interval of 6mm and a hash length of 3mm which is drawing a red 3mm Simple Line, using a round cap style.

  3. On top of that: The same configuration for a Hashed Line but in white

  4. On the whole layer level (under Layer Rendering) a Draw Effect: Inner Glow with a spread of 0.3mm and a blur radius of 1mm using a dark grey color.

It's a bit blotchy but transports the idea well enough in my opinion. I hope you like it!

3
  • 1
    at step 3, you should add an offset of 3 mm to show the same as on the picture
    – jlSta
    Nov 10, 2020 at 21:01
  • 1
    With the new group blending possibilities in QGIS 3.24+ one could probably put the inner glow on a separate layer and cut the sides and corners of the cane more nicely. Dec 12, 2021 at 15:20
  • Could you add an exemple?
    – jlSta
    Dec 13, 2021 at 16:06

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.