Ludwig's excellent solution is the first I would use.

However, if there are too many labels then you could use QGIS "expressions"
in the vector layers to suppress labeling when the raster is enabled.
See Mask plugin which installs a "is_layer_visible" function which might then be used
in a vector layer's Properties > Labels > Placement > Geometry Generator as
 case
  when is_layer_visible('your-raster-layer-ID')
   then intersection($geometry,raster-layer-geometry)
   else $geometry
 end

Obviously there are details to be worked out, but I've been amazed at the power of QGIS expressions.

Garth Fletcher

On 7/21/25 Ann-Christin Voss <ann-christin.v...@geoas.de> wrote:
Is there a way to mark a raster as a block for other labels, as it is
possible for vector layers? The raster is loaded as vrt and I don't want
  to show any labels in the area of the raster.

I'm used to labels connected to the layer itself; therefore, if a raster
  is stacked above vector layers, it should overlay also the labels of
all the layers lying underneath, but in QGIS the labels are all gathered
  in the top position.

From: Ludwig Kniprath<lud...@kni-online.de>

if their number is not too high, you can use the label-toolbar to hide
some of the?unwanted labels manually:

Note:
QGis uses an "AuxiliaryLayer" attached to the labeled layer which stores
the feature-individual label-settings within the QGis-project:

_______________________________________________
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to