<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>(not tested !!)<br>
    </p>
    <p>UPDATE a_table AS a SET a.geom = b.cgeom from (select name,
      ST_ConcaveHull(ST_Collect(geom), 0.99) as cgeom from b_table group
      by name having count(*) >= 3) AS b WHERE a.name = b.name </p>
    <div class="moz-cite-prefix">the "count(*) >= 3" removes point
      collections which will result in degenerative concave hulls</div>
    <div class="moz-cite-prefix"> <br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Den 27-04-2020 kl. 12:29 skrev
      Shaozhong SHI:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+i5JwbR+dzO0-DHL4DpYggj81rwiHtz4Sxvuv-dOtARa5bvUQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">I added a new column.
        <div><br>
        </div>
        <div>alter table a_table add column geom geometry(Polygon,
          27700);<br>
        </div>
        <div><br>
        </div>
        <div>Then, </div>
        <div><br>
        </div>
        <div>update a_table set geom = (select
          ST_ConcaveHull(ST_Collect(geom), 0.99) from b_table where name
          = _name) where name = _name;<br>
        </div>
        <div><br>
        </div>
        <div>It kept throwing up an error message saying: "geometry type
          point does not match polygon".</div>
        <div><br>
        </div>
        <div>I thought that a concavehyll is a polygon.  That is why I
          created a polygon column for it.</div>
        <div><br>
        </div>
        <div>Can anyone help?</div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div><br>
        </div>
        <div>Shao</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Med venlig hilsen / Kind regards

Bo Victor Thomsen
</pre>
  </body>
</html>