获取影像的波段百分比值。
语法
float8 ST_Percentile(raster raster_obj,
integer band,
integer percentage)参数
| 参数名称 | 描述 |
|---|---|
| raster_obj | raster对象。 |
| band | 指定的波段序号,从0开始,格式类似'0,1-3,6,8'的形式, ''表示所有的波段。
|
| percentage | raster对象的百分比。可通过ST_BuildPercentiles或ST_ComputeStatistics获取。 |
示例
SELECT st_percentile(rast_obj, 0, 10)
FROM raster_table
WHERE id = 1;
--------------------
29.7ST_Quantile的功能也可以使用ST_Percentile实现:
SELECT st_percentile(rast_obj, 0, 25), st_percentile(rast_obj, 0, 50)
FROM raster_table
WHERE id = 1;