[postgis-users] geometry type issue
Shaozhong SHI
shishaozhong at gmail.com
Wed Apr 29 06:34:52 PDT 2020
Hello, Bo Victor Thomsen,
A very good point!
By the way, would ST_ConcaveHull for a point, leads to a point geometry?
Would ST_ConcaveHull for 2 points, leads to a line?
Would ST_ConcaveHull for 3 points, leads to a triangle (polygon)?
Regards,
Shao
On Mon, 27 Apr 2020 at 13:18, Bo Victor Thomsen <bo.victor.thomsen at gmail.com>
wrote:
> (not tested !!)
>
> 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
> the "count(*) >= 3" removes point collections which will result in
> degenerative concave hulls
>
>
> Den 27-04-2020 kl. 12:29 skrev Shaozhong SHI:
>
> I added a new column.
>
> alter table a_table add column geom geometry(Polygon, 27700);
>
> Then,
>
> update a_table set geom = (select ST_ConcaveHull(ST_Collect(geom), 0.99)
> from b_table where name = _name) where name = _name;
>
> It kept throwing up an error message saying: "geometry type point does not
> match polygon".
>
> I thought that a concavehyll is a polygon. That is why I created a
> polygon column for it.
>
> Can anyone help?
>
> Regards,
>
> Shao
>
> _______________________________________________
> postgis-users mailing listpostgis-users at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/postgis-users
>
> --
> Med venlig hilsen / Kind regards
>
> Bo Victor Thomsen
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20200429/ea9de69d/attachment.html>
More information about the postgis-users
mailing list