[postgis-users] ST_MapAlgebraExpr 2 rasters problem with resultant raster

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Tue Feb 25 13:40:15 PST 2014


What is the exact query you do when trying to compute the sum or the max of the resulting raster?

> -----Original Message-----
> From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
> bounces at lists.osgeo.org] On Behalf Of g.singh at utwente.nl
> Sent: Monday, February 24, 2014 3:44 PM
> To: postgis-users at lists.osgeo.org; postgis-users-owner at lists.osgeo.org
> Subject: [postgis-users] ST_MapAlgebraExpr 2 rasters problem with
> resultant raster
> Importance: High
> 
> Hi,
> 
> 
> 
> I am using ST_MapAlgepraExpr for the intersection of two rasters.
> 
> The first raster has minimum and maximum values as 5.112e-020 and
> 0.000125 respectively.
> 
> The second raster has minimum and maximum value as 0.000 and
> 0.000400 respectively.
> 
> 
> 
> I carry the raster intersection using expression
> 
> ST_MapAlgebraExpr(a.rast1,b.rast2, '[rast1.val] * [rast2.val]', '32BF',
> 'INTERSECTION', 'NULL', 'NULL')
> 
> And got a resultant raster whose value ranges from 0.000 to 1.862e-008.
> 
> 
> 
> When I query the resultant raster for sum(ST_Summarystats(rast)) or
> max(ST_Summarystats(rast)) I get the blank cell with double precision
> datatype.
> 
> 
> 
> I can visualize the raster and can see the sum of all cell values, max and min
> cellvalues in ILWIS software but can not calculate the same using postgis
> queries.
> 
> 
> 
> Is there something wrong in my above map algebra expression or there is a
> problem with map algebra function?
> 
> 
> 
> Can someone please provide any solution to this problem.
> 
> 
> 
> Thanks in Advance.
> 
> Gaurav



More information about the postgis-users mailing list