<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>you can use overlay functions instead, there you can sort the
      size of intersection and take the biggest one:</p>
    <p><i>overlay_intersects(layer:='</i><i>PARCEL_LAYER</i><i>', 
        expression:="parcel_id", sort_by_intersection_size:='des')[0]</i><br>
    </p>
    <div class="moz-cite-prefix">hope this helps</div>
    <div class="moz-cite-prefix">Stefan</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Am 12.06.2023 um 14:04 schrieb celati
      Laurent via QGIS-User:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHByMH3XO8HSYqYDvkS2jB=ZumP00zTEdVK3FzcKv92Q0zffuw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Good afternoon,<br>
        With Qgis 3.30, In the composer interface, I generate an atlas. 
        <div>My iteration layer is a 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 :<br>
          <br>
          <i>  aggregate(<br>
            'LAYER':="PARCEL_LAYER',aggregate:='concatenate',<br>
              expression:="parcel_id",<br>
            filter:=intersects(geometry(@parent), $geometry))</i></div>
        <div><br>
          It works. But the result shows values of all the
          intersections. I would like it limit to the result of the
          biggest intersection. Would you know how to do it?<br>
        </div>
        <div><br>
        </div>
        <div>Thanks a lot.</div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-User mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant
------------------------------------------------------
Aufwind durch Wissen!
Jetzt neu: Webinare und Online-Schulungen
bei der <a class="moz-txt-link-abbreviated" href="http://www.foss-academy.com">www.foss-academy.com</a>
------------------------------------------------------

WhereGroup GmbH
Schwimmbadstr. 2
79100 Freiburg
Germany

Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11

<a class="moz-txt-link-abbreviated" href="mailto:stefan.giese@wheregroup.com">stefan.giese@wheregroup.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.wheregroup.com">www.wheregroup.com</a>
Geschäftsführer:
Olaf Knopp, Peter Stamm 
Amtsgericht Bonn, HRB 9885</pre>
  </body>
</html>