<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 24.06.20 10:45, Ben Hur Pintor
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFAduORxHrHWc7wyxfsftc3EJC1dAvgHPDtvrs9v-3vxih_oPw@mail.gmail.com">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <blockquote class="gmail_quote">aggregate (
          layer:='yourpolygonlayername', aggregate:='concatenate',
          expression:="yourfieldtoextract", filter:=contains($geometry,
          geometry(@parent)))<br>
        </blockquote>
        <div> </div>
        <div>+1 for Harissou's answer. I'm gonna copy this one in my
          future workflows. Thanks!<br>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>Hi,</p>
    <p>things are already even better nowadays,</p>
    <p>Instead of manually putting those functions in the field
      calculator, you can just put it in the attributes fields settings
      as "default value" and check update on edit, so you won't have to
      run it ever again on changes of the layer.<br>
      Don't know how this affects performance, but I just recently found
      out about it, and for my small scale projects, it works nicely. As
      a long time user, you easily oversee those possibilities when you
      have been used to work around missing things. Actually, I regard
      this feature as a killer feature for those not working with views
      on databases etc. <br>
    </p>
    <p>Cheers,</p>
    <p>Bernd<br>
    </p>
    <blockquote type="cite"
cite="mid:CAFAduORxHrHWc7wyxfsftc3EJC1dAvgHPDtvrs9v-3vxih_oPw@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div><br>
          </div>
          <div>You can also try the <a
              href="https://plugins.qgis.org/plugins/pointsamplingtool/"
              target="_blank" moz-do-not-send="true">Point Sampling Tool</a>
            plugin. It allows for multiple vectors and raster to be
            sampled. It creates a 3rd layer + it results in 1
            column/attribute per sampled attribute of the layers. If
            your purpose is to have a single column/attribute hold the
            values sampled from a series of vector layers (layer 1,
            layer 2, layer 3, etc.), you might need to merge your layers
            to sample first.</div>
          <div><br>
          </div>
          <div>You can also try the v.what.vect or v.what.rast GRASS
            modules within QGIS for sampling vectors and rasters
            respectively. This option does not create a third layer but
            simply updates the point layer with values from the sampled
            layer although it only allows for one layer to be sampled at
            one time resulting again in multiple columns if you want to
            sample multiple layers.</div>
          <div><br>
          </div>
          <div>In both cases, if you have multiple layers that you want
            to sample (with similar attributes + no overlap), you can
            merge these layers first before sampling them. If they have
            similar attributes/fields, you can then sample the resulting
            layer. Of course this adds another step to your workflow.</div>
          <div><br>
          </div>
          <div>All the best,</div>
          <div>Ben Hur</div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Jun 24, 2020 at 2:01
          PM Harrissou <<a href="mailto:delazj@gmail.com"
            target="_blank" moz-do-not-send="true">delazj@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote">
          <div lang="EN-NZ">Hi Tony,<br>
            <br>
            You can use functions from the aggregate group in the field
            calculator of the point layer. No need to create a third
            layer. (Somehow) Picked from the QGIS function help panel<br>
            <br>
            aggregate ( layer:='yourpolygonlayername',
            aggregate:='concatenate', expression:="yourfieldtoextract",
            filter:=contains($geometry, geometry(@parent)))<br>
            <br>
            This will populate the point layer field with values of
            whatever polygon covers the point.<br>
            You can also use the direct functions concatenate,
            concatenate_unique, minimum, maximum... depending on how
            your data are shaped and what you actually need.<br>
            <br>
            Hope that helps,<br>
            Harrissou<br>
            <br>
            <div class="gmail_quote">Le 24 juin 2020 05:29:58 GMT+02:00,
              "Tony Shepherd (FarmMaps NZ)" <<a
                href="mailto:tony@farmmaps.nz" target="_blank"
                moz-do-not-send="true">tony@farmmaps.nz</a>> a écrit
              :
              <blockquote class="gmail_quote">
                <div>
                  <p class="MsoNormal">Hi All</p>
                  <p class="MsoNormal"> </p>
                  <p class="MsoNormal">Am I missing something?  Is there
                    a simple point and click tool in QGIS to update an
                    existing field in a QGIS layer based on a value in
                    another using a geographic join?  For example a
                    series of points and a series polygons.  I want to
                    update a field in points from a value in a field in
                    polygons based on which polygon the point falls in. 
                    Simple stuff.</p>
                  <p class="MsoNormal"> </p>
                  <p class="MsoNormal">In a previous life using MapInfo
                    we simply used query editor and</p>
                  <p class="MsoNormal">update point_layer set col1 =
                    colx from polygon_layer where obj within any</p>
                  <p class="MsoNormal"> </p>
                  <p class="MsoNormal">To me, this seems like a very
                    simple everyday thing to do to an existing table.  I
                    can, of course, use vector -> Join Attributes by
                    Column but why in this case would I needlessly
                    complicate things by having to create a third
                    layer?  I don’t need an extra layer, I just need to
                    update the one I have already.</p>
                  <p class="MsoNormal"> </p>
                  <p class="MsoNormal">I can see that the internet is
                    littered with similar questions dating back as long
                    as QGIS has been around.  Perhaps I have missed
                    something obvious, and if so apologies for wasting
                    the time of others, but can you point me to the
                    tool?</p>
                  <p class="MsoNormal"> </p>
                  <p class="MsoNormal"><span>Cheers</span></p>
                  <p class="MsoNormal"><span>Tony</span></p>
                  <p class="MsoNormal"><span> </span></p>
                  <p class="MsoNormal"><b><span>Tony Shepherd</span></b><span> 
                    </span><b><span>|</span></b><span>  GeoSpatial /
                      Mapping Manager</span></p>
                  <p class="MsoNormal"><span>Ph 027 435 6193  </span><b><span>|</span></b><span> 
                      E <a href="mailto:tony@farmmaps.nz"
                        target="_blank" moz-do-not-send="true"><span>tony@farmmaps.nz</span></a></span></p>
                  <p class="MsoNormal"><span>FarmMaps NZ, 3 Kerwood
                      Place, Gore 9740</span></p>
                  <p class="MsoNormal"><span> </span></p>
                  <p class="MsoNormal"><span><img
                        id="gmail-m_-5209304714054674772gmail-m_6369489664430954852_x0000_i1027"
                        alt="FM_logo1_small (Custom)"
                        moz-do-not-send="true" width="160" height="75"></span></p>
                  <p class="MsoNormal"><span> </span></p>
                  <p class="MsoNormal"><b><span> </span></b></p>
                  <p class="MsoNormal"><a
                      href="http://tonyshepherd8.wixsite.com/home"
                      target="_blank" moz-do-not-send="true"><b><span><img
id="gmail-m_-5209304714054674772gmail-m_6369489664430954852Picture_x0020_1"
                            moz-do-not-send="true" width="157"
                            height="34"></span></b></a><a
href="https://www.wunderground.com/personal-weather-station/dashboard?ID=ISTLGORE2"
                      target="_blank" moz-do-not-send="true"><b><span><img
id="gmail-m_-5209304714054674772gmail-m_6369489664430954852Picture_x0020_3"
                            moz-do-not-send="true" width="170"
                            height="37"></span></b></a><b><span></span></b></p>
                  <p class="MsoNormal"> </p>
                </div>
              </blockquote>
            </div>
            <br>
            -- <br>
            Envoyé de mon appareil Android avec Courriel K-9 Mail.
            Veuillez excuser ma brièveté.</div>
          _______________________________________________<br>
          Qgis-user mailing list<br>
          <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank"
            moz-do-not-send="true">Qgis-user@lists.osgeo.org</a><br>
          List info: <a
            href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
          Unsubscribe: <a
            href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote>
      </div>
      <br>
      <div><br>
      </div>
      -- <br>
      <div dir="ltr">
        <div dir="ltr">
          <div>
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div>
                          <div dir="ltr"><span>
                              <div dir="ltr">
                                <div dir="ltr">
                                  <div dir="ltr">
                                    <div dir="ltr">
                                      <div dir="ltr">
                                        <div>---</div>
                                        <div><b>Ben Hur S. Pintor</b><br>
                                        </div>
                                        <div>
                                          <div><a
                                              href="https://bnhr.xyz/"
                                              target="_blank"
                                              moz-do-not-send="true">bnhr.xyz</a></div>
                                          <div><a
                                              href="mailto:hi@bnhr.xyz"
                                              target="_blank"
                                              moz-do-not-send="true">hi@bnhr.xyz</a></div>
                                        </div>
                                        <div><br>
                                        </div>
                                        <div><img moz-do-not-send="true"><br>
                                        </div>
                                        <div><span>open spatial &
                                            data solutions</span><br>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </span></div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></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>
  </body>
</html>