9

I have two layers in my QGIS Project (QGIS 3.4.8). One in the foreground, which contains surfaces, and one in the background, which contains a point with labels, see image below:

enter image description here

The problem is that the labels from the second layer are always in the foreground:

enter image description here

I would like the second layer's label to be displayed in the background, just like the layer itself.

Is this possible in QGIS?

Desired target result (image edited with MS Paint):

enter image description here

4

2 Answers 2

9

Using QGIS 3.16.0

Assuming your labels are stored in "name" field, go to Layer Properties > Labels and set the labeling expression as below:

if(overlay_disjoint('area'), "name", "")

enter image description here

More information about overlay_disjoint() function, please find in Changelog for QGIS 3.16 and QGIS Docs » List of functions » overlay_disjoint.

1
  • Would probably be possible using older QGIS versions with either overlaps or disjoint and some aggregate-wizardry.
    – Erik
    Commented Nov 17, 2020 at 10:44
3

I have a similar question, and I find a solution. I don't know if this can help:

  • find the label style of the polygon feature.
  • set it as "blocking" enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.