I have this print layout in QGIS print composer/atlas in which I only have one layer being shown: land parcels. I am interested in having a label that will show what is the attribute of another layer I have based on a spatial relationship like intersects.
This other layer is a layer of land uses. The idea is to have next to the map what are the allowed uses for that particular plot. The image below recreates what I need.
It seems there is no straight way to build this expression within the context of the QGIS Print Composer, but I think I am missing something. The closest I got an expression that feeds my label object is this expression:
if(intersects(@atlas_geometry, geometry(get_feature('land_use', "fid", "fid" > 0))),
"use",
'No restriction')
However this expression is always returning No restriction
and this I am absolutely sure it cannot be. Therefore, this leads me to believe the intersects
part is not being evaluated as I think it is. What could be wrong here?