Feature request #7779

Add possibility for labels to not register as collision in label collision engine for specific layer(s)

Added by Mathieu Pellerin - nIRV over 7 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Labelling
Pull Request or Patch supplied:No Resolution:fixed
Easy fix?:No Copied to github as #:16674

Description

At the moment, QGIS has a general switch off to disable label collision engine for all layers. I believe the users would benefit from having a more refined control here and have the possibility to disable / ignore label collision engine on a per layer basis.

I've attached a simple example screenshot to this feature request. To do this map, I had to use composer label items over a map item. While it's an ok workaround, it has its limitation: label strings are not linked to layer attribute, nor are the labels spatially linked, so if I change the map zoom level or extend, the labels would have to be redone.

If the above feature request could be done, the user would simply have to deactivate collision engine for the area layer and have it display over other labels.

dakcarto-labels-ignore-engine.png (635 KB) Mathieu Pellerin - nIRV, 2013-05-08 03:22 AM

dakcarto-labels-ignore-engine_not_show-all.png (632 KB) Mathieu Pellerin - nIRV, 2013-05-08 07:34 PM

collision.zip (5.73 KB) Mathieu Pellerin - nIRV, 2013-05-14 11:55 PM

History

#1 Updated by Mathieu Pellerin - nIRV over 7 years ago

The proposed behavior is different from an already implemented option, namely the "show all labels for this layer (including colliding labels)".

I've attached a rendered map using the "show all labels" option. As the map shows, the big region labels are still interacting with underlying labels. See for e.g. the absence of road label "Pasteur (st:51)" or the label displacement for road 322. While some of the issues can be fixed by lowering the priority of the area labels, the labels are still taken into account by the collision engine.

What IMO would be useful is a switch for a layer's labels to not be using the collision engine, nor for its labels to be considered by other layers using the collision engine. "show all labels for this layer" is half of this feature request, we need a "remove layer labels from collision engine" switch too.

Hope these additional details help.

#2 Updated by Mathieu Pellerin - nIRV over 7 years ago

  • Subject changed from Add possibility to disable/ignore label collision engine for specific layer(s) to Add possibility for labels to not register as collision in label collision engine for specific layer(s)

I've tried to place label using data defined x, y with [x] always show labels checked as well as having the priority to its lowest. The resulting label(s) still register in the collision list and influence other labels from other layers. I've made these quick screenshots to show what's happening: http://imgur.com/a/KTK66

When label is activated on the polygon layer (data defined placement, etc.), it still pushes the underlying line layer away. While the test case above is ridiculous and doesn't show usefulness of this feature request in context, it does show the data defined labels still registered in collision list.

#3 Updated by Mathieu Pellerin - nIRV over 7 years ago

attaching sample project used in the above screenshots to this issue.

#4 Updated by Larry Shaffer over 7 years ago

  • Status changed from Open to Resolved

This was actually an issue involving the previous 'Features act as obstacles' setting that was greyed-out, but also always on by default.

It is now an active setting with text label of 'Discourage labels from covering features.' Turning it to off fixed this issue.

Included in commit 45f374f4

Reopen if necessary

#5 Updated by Mathieu Pellerin - nIRV over 7 years ago

  • Resolution set to fixed
  • Status changed from Resolved to Closed

Also available in: Atom PDF