Bug report #7680

labels with (rectangle) background overlap each other

Added by Mathieu Pellerin - nIRV over 11 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Labelling
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:16597

Description

The new background feature for labels seem to be missing some refinement in its collision detection algorithm. As seen in the attached screenshot, it currently fails to prevent label overlap. It might be due to the buffer value not being taken into account?

label-background-overlap.jpg (585 KB) Mathieu Pellerin - nIRV, 2013-04-22 08:11 PM

History

#1 Updated by Larry Shaffer over 11 years ago

It is not part of the implementation for any backgrounds or drop shadows, yet. See commit b809723

This should be an optional setting (off by default), as calculating the bounds of the label's background can be expensive and lead to unexpected results (I'm figuring much less labels would be rendered in some cases). While 'normal' backgrounds are not a big issue (those of fixed size or slight buffers), ones with significant offset and rotation might cause problems.

Concerning SVGs, there will need to be loading of the file twice (unless still cached) and creation of possibly significant QImage of the shadow twice per SVG per layer to both calculate and render the label. And, the calculating upfront, before sending to PAL would be for all labels, including the ones that may never be rendered. Again, some caching might help there.

I will be looking into this within the next week.

#2 Updated by Jürgen Fischer over 10 years ago

  • Category set to Labelling

#3 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#4 Updated by Giovanni Manghi almost 6 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF