Calculating statistics on a raster value in an ST_Raster column
Raster statistics include the mean, standard deviation, minimum value, and maximum value. Raster statistics are used by applications. Among other things, raster statistics are used to stretch the data to enhance its display.
Use the buildStats function to calculate statistics on the raster value stored in an ST_Raster column.
In these examples, statistics are calculated on the raster column value that is in a row with a name column value equal to ALL_CITIES.
UPDATE URBAN_AREA t SET raster = t.raster.buildStats() WHERE NAME = 'ALL_CITIES';
UPDATE urban_area SET raster = buildStats(raster) WHERE name = 'all_cities';
UPDATE urban_area SET raster = raster.buildStats(NULL) WHERE name = 'all_cities';