0

I have an Issue to display overlapped Lines in Parallel, first the overlapped Lines share the same row in Attribute Table (see picture).

enter image description here

Any idea? This is the Lines:

enter image description here

1 Answer 1

1

At first you have to split your attribute that differentiates the both lines.

Depending on how complex your other values are this post might actually have all you need to do: How to split a text attribute by characters in QGIS 2.6.0

Edit for three different values in one entry: You can get the first and last with a left or right construction like shown in the link. To get the middle value you can use: regexp_substr( "Belegung" ,'[,](.*)[,]') .

If you have the the two (edit three) columns with your values (in your example LINE1-green and LINE2-red) you can use rule based styling to have a different layout for them. The rule for the second line may look like : "your_second_column" <> '' or depending on your datatype "your_second_column" is not null. For this rule you set an offset for your line. All other lines will have no offset as long as your second column is empty. For this you need a second rule "your_first_column" <> ''. This will draw one line if the second column is empty and two lines with offset if the second column has some value in it. For the third value you have to add another rule accordingly and set a higher offset than you have for you second column. You get three lines with different offsets.

The offset-settings:

enter image description here

The style-settings:

enter image description here

The table and final look:

enter image description here

2
  • Hello @Matte, thank you for your Help, i tried your Solution and dint´work, because 1- i have different overlapped Lines in one row (3,2, or only 1) not only Two lines in one Row, although i tried your Solution for 2 overlapped Lines and didn't work !
    – AED EDA
    Commented Aug 9, 2018 at 10:10
  • Edited the answer with the example for 3 possible values.
    – Matte
    Commented Aug 9, 2018 at 16:44

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.