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

Kadir Şahbaz
  • 76,800
  • 56
  • 247
  • 389
AED EDA
  • 187
  • 2
  • 12

1 Answers1

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

Matte
  • 6,235
  • 13
  • 18
  • 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 Aug 09 '18 at 10:10
  • Edited the answer with the example for 3 possible values. – Matte Aug 09 '18 at 16:44