[postgis-users] Raster cell size and wrong mean value calculation problem
Pierre Racine
Pierre.Racine at sbf.ulaval.ca
Wed Jan 23 11:39:47 PST 2013
> The raster cells with the same elevation value got merged, why?
Because intersecting with every single pixel outline would be just too long.
> The mean value which based on the actual result cannot be correct.
You actually want to compute a weighted mean, not simply a mean. The weighted mean give a correct result (actually more accurate than the clip option but requiring more geometric processing).
Have a look at the tutorial which is now a little bit old:
http://trac.osgeo.org/postgis/wiki/WKTRasterTutorial01
The other way is as Bborie said. ST_Clip() the raster and ST_SummaryStat().
Pierre
More information about the postgis-users
mailing list