全部產品
Search
文件中心

ApsaraDB RDS:ST_Percentile

更新時間:Aug 26, 2026

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

文法

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

參數

參數名稱

描述

raster_obj

raster對象。

band

指定的波段序號,從0開始。

percentage

raster對象的百分比。可通過ST_BuildPercentiles或ST_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;