[postgis-users] Postgis Raster determine exact hull

Regina Obe lr at pcorp.us
Mon Jan 10 23:02:45 PST 2022

You could also try using ST_Polygon


It will treat all non NA as the same resulting in a polygon or multipolygon.






From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Marcin Mionskowski
Sent: Tuesday, January 11, 2022 12:43 AM
To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Subject: Re: [postgis-users] Postgis Raster determine exact hull



Try to reclassify the raster first so that all "non NA" values are equal (e.g. 1), then do ST_DumpAsPolygons.




pon., 10 sty 2022 o 21:27 Richard Huesken <richard.huesken at gmail.com <mailto:richard.huesken at gmail.com> > napisał(a):



I'm using postgis 3.1 and I'm looking for the best way to obtain the exact hull of a raster (excluding the nodata points). The st_minconvexhull uses the MBR of the raster coverage, and is therefore quite fast. The result is however not as accurate as I require.


I constructed some sql that uses st_pixelaspolygons and then does a st_union. However, My typical raster has 256x256 points, and with several 100s of rasters this is quite slow.


Are there more clever (and faster!) ways to get the exact hull of a raster?


Thanks in advance,



postgis-users mailing list
postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20220111/1541b17f/attachment.html>

More information about the postgis-users mailing list