[Qgis-developer] What is "Discourage other labels from covering features in this layer" option in layer properties?

Nyall Dawson nyall.dawson at gmail.com
Wed Sep 2 13:57:23 PDT 2015


On 2 September 2015 at 22:46, DelazJ <delazj at gmail.com> wrote:
> In QGIS master (524716f), Layer's Properties > Labels, where we use to
> select in a combobox the field to label, there is now a combobox with
> options like :
> - No labels;
> - Show labels for this layer;
> - Discourage other labels from covering features in this layer.
> I'd like to understand why this third option is there and what it does
> (since choosing it just deactivates labels properties - just like "No
> labels" option).
> If it's supposed to set the layer features as obstacles for other layer's
> labels, shouldn't it be a checkbox in Labels > rendering > Obstacles?
> Moreover, someone may want to show labels of a layer but discourage other
> layers to have their labels covering the features of the first layer. Is
> that possible with this configuration without duplicating the layer?

There's a little more detail about the change here [1]. But basically,
in the past it was only possible for a layer to act as an obstacle for
labeling if the layer itself had labels. This isn't ideal - eg in my
current project I have a water bodies layer which isn't labelled, but
I still want to avoid labels for roads/features being placed over the
water features where possible.

So this change was made so that you can now have layers act as
obstacles without being labelled themselves. I agree that the UI for
this isn't ideal, but I couldn't come up with a better approach. This
setting needs to be grouped with the label properties, and it's also
important to make it clear that if you label a layer it can still act
as an obstacle layer.

I do have one followup change planned, which is to move the actual
widgets for configuring the obstacle behaviour (eg the obstacle
priority and polygon obstacle behaviour combobox) into a new
"obstacles" setting pane (placed under the existing
buffer/shadow/placement/... etc panes). Then this obstacle pane would
be set as the only visible pane when the mode is set to "discourage
other labels...", since the settings there apply also to obstacle-only
layers. Make sense?

I'm not tied to this approach, and am open to a better UX for this.
Mockups are welcome!

Nyall






[1] http://nyalldawson.net/2015/07/recent-labelling-improvements-in-qgis-master/


>
> Thanks
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list