[postgis-users] ST_SummaryStat on nodata raster

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Sat Jun 16 20:55:05 PDT 2012


Hi,

Seems to me that when computing summary stats on a null raster (having only nodata values and the count of significant pixel is 0), then the sum, the mean, the stddev, the min and the max should be null. However this:

SELECT ST_SummaryStats(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 0, 0, 4326), '16BSI'::text, 0, 0));

returns that:

"(0,0,0,-1,0,0)"

Confusing... If zero pixel were taken into account in the stats, then there should be no results for the other metrics. If I fetch only the min, the max, or the average, how do I know there are actually not significant?

Pierre



More information about the postgis-users mailing list