Database Reference
In-Depth Information
Let's see how the values of the raster tile are distributed with ST_Histogram() .
WITH hist AS (
SELECT
(ST_Histogram(rast, 1)).*
FROM prism
WHERE rid = 550
)
SELECT
round(min::numeric, 2) AS min,
round(max::numeric, 2) AS max,
count,
round(percent::numeric, 2) AS percent
FROM hist
ORDER BY min;
The output will look as follows:
min | max | count |
percent---------+---------+-------+---------943.00
| 1004.07 | 51 | 0.011004.07 | 1065.14
| 299 | 0.041065.14 | 1126.21 | 884 |
0.121126.21 | 1187.29 | 925 | 0.131187.29
| 1248.36 | 652 | 0.091248.36 | 1309.43
| 997 | 0.141309.43 | 1370.50 | 1785 |
0.251370.50 | 1431.57 | 992 | 0.141431.57
| 1492.64 | 311 | 0.041492.64 | 1553.71
| 130 | 0.021553.71 | 1614.79 | 33 |
0.001614.79 | 1675.86 | 13 | 0.001675.86
| 1736.93 | 6 | 0.001736.93 | 1798.00
| 3 | 0.00
Itlooksasifabout78percentofallofthevaluesareatorbelow 1370.50 .Another
way to see how the pixelvalues are distributed is to use ST_Quantile() .
Search WWH ::




Custom Search