TransWikia.com

What is the fastest way to create a polygon of the part of PostGIS raster that is not filled with NoData values?

Geographic Information Systems Asked on May 27, 2021

I have a raster table in PostGIS. For each row, I want to create a polygon that represents the part of the raster that is filled with data (not NODATA). I found out that ST_Polygon(rast) does the job. However, it works very very slowly.

Is there another solution for this problem that works faster?

One Answer

you could try with ST_DumpAsPolygons (which uses gdal internally). To avoid making unnecessary polygons, make sure the you set a single value for each pixel that should end up in a polygon (e.g. with ST_Reclass).

Answered by radouxju on May 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP