[postgis-users] Problem with union of rasters (postgis 2.4 rds)

Lionel Cayla lionelcayla at yahoo.se
Tue Jun 2 06:17:18 PDT 2020


 Hi, 

I am having an issue, when rasterizing a union of rasters. Each of the geometries from my initial table are quads or polygons, and the following SQL command (that should work according the documentation right?) gives me a raster 2x2 .
CREATE TABLE raster_test AS(WITH rast AS (SELECT ST_ASRaster(ST_SetSRID(ST_EXTENT( myQuads), 4326), 0.1, 0.1 ,'8BUI')   FROM myDB,    WHERE ST_IsValid(myQuads)),  raster_ AS (SELECT ST_Union(ST_ASRaster(ST_SetSRID(ST_Force2D( myQuads), 4326), rast.ST_ASRaster), 'SUM')   FROM myDB, rast   WHERE myQuads  IS NOT NULL) SELECT  raster_.ST_Union as rast_chunks  FROM raster_, rast );
The command produces the desired raster if I replace my resolution (0.1, 0.1) by the raster size if it's equal to 150. Over that (200 say) I get an alignment error message.I tried to cast 0.1 to double precision I still get an issue. 

I am wondering if I am doing something wrong here or if there's a known issue. 
Thanks, 
-Lio  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20200602/c8526528/attachment.html>


More information about the postgis-users mailing list