Bug report #15296

Curved labels not showing when 'Merge connected lines' is on

Added by Frits van Veen about 4 years ago. Updated almost 3 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Unknown
Affected QGIS version:2.16.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23230

Description

When I switch 'Merge connected lines' on, I do not expect less distinct labels. In the screenshots look at 'Vengraven', 'Mertenshof' and 'Geertshof'.
I did some testing (see attached text file) and it appears that the merged lines are shorter than the sum of the parts. More specifically, it appears that the last line segment is not accounted for.

1_separate_lines.png (128 KB) Frits van Veen, 2016-07-18 12:54 AM

2_merged_lines.png (120 KB) Frits van Veen, 2016-07-18 12:54 AM

3_merged_lines_discourage_off.png (120 KB) Frits van Veen, 2016-07-18 12:54 AM

Merge_lines_problem.txt Magnifier (2.16 KB) Frits van Veen, 2016-07-18 12:54 AM

2016-07-20_06_48_04-QGIS_fd88d91_-_Top10NL.png (142 KB) Frits van Veen, 2016-07-19 09:57 PM

2016-07-20_06_48_41-Calculator.png (134 KB) Frits van Veen, 2016-07-19 09:57 PM

History

#2 Updated by Frits van Veen about 4 years ago

Unchecking 'Discourage labels from covering features' does not change much.

#3 Updated by Nyall Dawson about 4 years ago

Can you turn on the "show label candidates" option (under global label properties - the "arrow" button in the top right of the label settings) and attach screenshots?

#4 Updated by Frits van Veen about 4 years ago

Don't know if the screenshots help.
I do come at line 1472 in feature.cpp. Function FeaturePart::mergeWithFeaturePart where the comment says:
// sometimes it's not possible to merge lines (e.g. they don't touch at endpoints)
I don't know why this happens, but when it does, the behaviour should be to abandon the merge completely and not to leave a potentially large segment out.
I will look further into it. For now I'm going to enjoy a spell of nice weather we have here in Holland!

#5 Updated by Nyall Dawson about 4 years ago

  • Status changed from Open to Feedback

Have a look if 9007d5c has improved this for you...

#6 Updated by Frits van Veen about 4 years ago

  • Status changed from Feedback to Closed

Problem solved by 9007d5c

#7 Updated by Jürgen Fischer almost 3 years ago

  • Category set to Unknown

Also available in: Atom PDF