Returns the percentage value of a raster band.
Syntax
float8 ST_Percentile(raster raster_obj,
integer band,
integer percentage)Parameters
Parameter Name | Description |
raster_obj | The raster object. |
band | The number of the specified band. The value starts from |
percentage | The percentiles of the raster object, which you can obtain using ST_BuildPercentiles or ST_ComputeStatistics. |
Examples
SELECT st_percentile(rast_obj, 0, 10)
FROM raster_table
WHERE id = 1;
--------------------
29.7You can also use ST_Percentile to achieve the same results as ST_Quantile:
SELECT st_percentile(rast_obj, 0, 25), st_percentile(rast_obj, 0, 50)
FROM raster_table
WHERE id = 1;该文章对您有帮助吗?