Computes quantile statistics for each band in a raster object and writes the results into the object's metadata.
Syntax
raster ST_StatsQuantile(raster raster_obj)Parameters
Parameter | Description |
raster_obj | The raster object to process. |
Description
ST_StatsQuantile calculates quantiles for each band in a raster object and stores the results in the object's metadata.
The function returns the updated raster object with quantile statistics embedded in its metadata.
The quantile results are written to the raster object's metadata, not returned directly as a result set. To access the stored values, query the raster metadata after the update completes.
Examples
Calculate quantiles and store them in raster metadata
Run ST_StatsQuantile on a raster object to compute per-band quantile statistics and write them to the object's metadata:
UPDATE rat_quantile
SET raster = ST_StatsQuantile(raster)
WHERE id = 1;After the statement completes, the quantile statistics are available in the raster metadata for downstream queries or processing.