獲取影像的波段百分比值。

語法

float8 ST_Percentile(raster raster_obj,
                     integer band,
                     integer percentage)

參數

參數名稱 描述
raster_obj raster對象。
band 指定的波段序號,從0開始,格式類似'0,1-3,6,8'的形式, ''表示所有的波段。
percentage raster對象的百分比。可通過ST_BuildPercentilesST_ComputeStatistics獲取。

示例

SELECT st_percentile(rast_obj, 0, 10)
FROM raster_table
WHERE id = 1;

--------------------
29.7
ST_Quantile的功能也可以使用ST_Percentile實現:
SELECT st_percentile(rast_obj, 0, 25), st_percentile(rast_obj, 0, 50)
FROM raster_table
WHERE id = 1;