ST_SetStatistics

更新时间:
复制 MD 格式

Sets the statistics of a specified band in a raster object.

Syntax

raster ST_SetStatistics(raster rast, integer band, double min, double max, double mean, double std, cstring samplingParams)

Parameters

ParameterTypeDescription
rastrasterThe raster object.
bandintegerThe sequence number of the band. Band numbering starts at 0.
mindouble precisionThe minimum value of the band statistics.
maxdouble precisionThe maximum value of the band statistics.
meandouble precisionThe mean value of the band statistics.
stddouble precisionThe standard deviation of the band statistics.
samplingParamscstringThe sampling parameters. Valid values: {"approx":false} and {"approx":true}.

Example

Update the statistics of band 0 in the rast column:

UPDATE rast SET rast = ST_SetStatistics(rast, 0, 0.0, 255.0, 125.0, 23.6, '{"approx":false}');

Output:

(1 row)