i have Issue with labelling for overlapped lines,that i want to show the labels superposed , that mean: Label 1 Label 2 label 3

on the Map in Qgis , the Lines are overlapped, and i need to show the information for every line as label but lying upon each other here is how is look in Qgis now with attribute table.

enter image description here

enter image description here


Here's what my basic labels look like, with "show all labels" option selected. enter image description here

Add a new field, "Label_spacing"

enter image description here

Set the values of "Label_spacing" field to the distance you want the label for that feature to be from the line. I used 0, 5 and 10.

enter image description here

Use "Label_spacing" field for data-defined label placement setting (distance from line).

enter image description here

Here's what the labels look like now:

enter image description here

You can adjust the label spacing by changing the values in the field, "Label_spacing."

Note: All screenshots here are in QGIS 3.0, but the same process will work in QGIS 2.18, and possibly earlier versions as well.

  • @@ csk thank you very much you are the best, this what i looking for, i hope that work for all 2530 overlapped lines that i have automaticaly , thank you again – AED EDA Apr 27 '18 at 20:09
  • You're welcome! Another tip: since you have so many overlapped lines, use the Field Calculator to fill in the Line_spacing values. An expression like @row_number*5 will work if the lines are all overlapping. – csk Apr 27 '18 at 21:39
  • @@csk thank you again for your helpfull feedback, i think this with expression is littel bit complicated because i have diffeent overlapping lines sometimes 2 lines are overlaps sometimes 4.3,6 and so on and i have lines where no overlapping is, when i use your suggestion with @rown_number*5, i get too much distance to lines , ihave more than 200 Rows that mean distance =1000 in last line, i need expression or Sql query who check if there more than overlapped for example: overlapped lines = 4 , than insert in label_spacing successivly 0.00,5.00,10.00,15.00 and so on – AED EDA May 2 '18 at 17:11
  • That is a bit complicated. Try posting as a new question, with a link back to this one. – csk May 2 '18 at 17:52

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.