I am trying to filter features in one layer outside features in another layer using geometry generator.
I have a buildings layer and an area layer and now I want to only show the buildings outside the areas.
The buildings layer is a polygon layer and the area layer is also a polygon layer consisting of several areas (features).
Since it is a many feature area layer I think I need to use an aggregate function e.g. collect()
and/or aggregate()
from the QGIS expression builder.
I trying the following expression on the geometry generator on the buildings layer...
difference(
$geometry, collect(geometry
(get_feature('layer_id','attribute','value')
)
)
)
...which ends up in an syntax error message.