<div dir="ltr">Hello, Bo Victor Thomsen,<div><br></div><div>A very good point!</div><div><br></div><div>By the way, would ST_ConcaveHull for a point, leads to a point geometry?</div><div><br></div><div>Would
ST_ConcaveHull for 2 points, leads to a line?</div><div><br></div><div>Would
ST_ConcaveHull for 3 points, leads to a triangle (polygon)?</div><div><br></div><div>Regards,</div><div><br></div><div>Shao</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 27 Apr 2020 at 13:18, Bo Victor Thomsen <<a href="mailto:bo.victor.thomsen@gmail.com">bo.victor.thomsen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<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 href="http://a.name" target="_blank">a.name</a> = <a href="http://b.name" target="_blank">b.name</a> </p>
<div>the "count(*) >= 3" removes point
collections which will result in degenerative concave hulls</div>
<div> <br>
</div>
<div><br>
</div>
<div>Den 27-04-2020 kl. 12:29 skrev
Shaozhong SHI:<br>
</div>
<blockquote type="cite">
<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></fieldset>
<pre>_______________________________________________
postgis-users mailing list
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<pre cols="72">--
Med venlig hilsen / Kind regards
Bo Victor Thomsen
</pre>
</div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div>