I'm drawing lines in a map that represent cables in underground pipes. Sometimes there are multiple cables going through the same pipe, so I'd like to draw each cable as a different line, but want it to be represented/rendered as separate lines having some offset and ideally even being differently colored. Have tried multiple approaches with symbology and geometry generator, but haven't really had a success. The main goal is to do it via rendering/display and not have to manually set different offset value to each line or draw parallel lines myself. Is this even possible in QGIS?

Let's say three separate cables are coming towards the manhole from the left, one cable goes up, two goes down:

cables going through same path

I want them to be displayed something like this to visually represent their actual paths:

offset lines

  • 1
    are the three incoming cables features in the same layer, or are they in different layers?
    – Llaves
    Commented Sep 27, 2020 at 0:32
  • they are in the same layer. And there sometimes are up to 5-6 such overlapping lines. I found this gis.stackexchange.com/questions/239129/… approach to be very near to what I actually need.
    – squirrely
    Commented Sep 27, 2020 at 18:55
  • 3
    Does this answer your question? Shifting display of overlapping lines in QGIS?
    – Simbamangu
    Commented Sep 28, 2020 at 16:19
  • In contrast to the already linked answer you want do get rid of the angled beginnings and just get parallel lines as in your "target" image?
    – til_b
    Commented Oct 2, 2020 at 11:51
  • Parallel only would be enough. GreyHippo's approach is interesting. Too bad it involves manual data input for each line. It would be great if you only added an overlapping line and it'd get immediately offset.
    – squirrely
    Commented Oct 5, 2020 at 19:59

1 Answer 1


You can create a categorized symbology for the cables based on an attribute that has the number of cables. For the line styles that have more than one cable, add a new simple line and adjust the offset value. I used 1 millimeter between lines. The problem you may run into is that the junction points may be two small to coverup the ends of the line

line style




  • If there's no existing attribute showing the number of overlapping cables/lines, how would you create one?
    – Llaves
    Commented Sep 28, 2020 at 19:31
  • You would need to create a new field and fill in the data manually for each feature
    – GreyHippo
    Commented Sep 29, 2020 at 2:04
  • I used to do it something like this before. But when you need to put lots of lines and have to input all that data, you immediatelly start looking for some more elegant way. I'd prefer to just draw an overlapping line and offseting was done automatically no matter how many lines are put. I'd also like to have continous lines that actually represent single cable end to end. In your proposed way, I'd have to split it into parts at places where line count changes (for example where cables go different ways). But then I could just disable snapping and draw every line with wanted offset..
    – squirrely
    Commented Oct 5, 2020 at 20:12

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.