Database Reference
In-Depth Information
2 AS bandnum,
(ST_BandMetadata(rast, 2)).*
FROM prism
WHERE rid = 550
ORDER BY bandnum;
The output looks as follows:
bandnum | pixeltype | nodatavalue | isoutdb |
path---------+-----------+-------------+---------+------1
| 32BSI | -9999 | f |2 |
32BF | -9999 | f |
Thefirstbandisthesameasbeforeandthenewsecondbandhasthecorrectattrib-
utes(the 32BF pixeltypeandthe NODATA value of -9999 )thatwespecifiedinthe
callto ST_MapAlgebra() .Therealtestthoughistolookatthesummarystatistics.
WITH stats AS (
SELECT
1 AS bandnum,
(ST_SummaryStats(rast, 1)).*
FROM prism
WHERE rid = 550
UNION ALL
SELECT
2 AS bandnum,
(ST_SummaryStats(rast, 2)).*
FROM prism
WHERE rid = 550
)
SELECT
bandnum,
count,
round(sum::numeric, 2) AS sum,
round(mean::numeric, 2) AS mean,
round(stddev::numeric, 2) AS stddev,
Search WWH ::




Custom Search