5

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
7

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 Nov 17 '20 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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