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
| Parameter | Type | Description |
|---|---|---|
rast | raster | The raster object. |
band | integer | The sequence number of the band. Band numbering starts at 0. |
min | double precision | The minimum value of the band statistics. |
max | double precision | The maximum value of the band statistics. |
mean | double precision | The mean value of the band statistics. |
std | double precision | The standard deviation of the band statistics. |
samplingParams | cstring | The 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)该文章对您有帮助吗?