1

With QGIS 3.30, In the composer interface, I generate an atlas. My iteration layer is polygonal layer (platforms). I added a text element to automatically get by spatial intersection the 'parcel_id' attribute present in another polygonal layer. I use the aggregate function for this task :

aggregate(
    'LAYER':='PARCEL_LAYER',
    aggregate:='concatenate',
    expression:="parcel_id",
    filter:=intersects(geometry(@parent), $geometry)
)

It works. But the result shows values of all the intersections. I would like it limit to the result of the biggest intersection. How can I do this?

1 Answer 1

0

Use overlay_intersect() function for that. In newer QGIS versions, it has an optional argument sort_by_intersection_size. So this should work:

concatenate( 
overlay_intersects(
        'PARCEL_LAYER',
        "parcel_id",
        sort_by_intersection_size:='des'
    )[0]
)
    

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.