Database Reference
In-Depth Information
------------+---------------
198 | tmax01.bil
198 | tmax02.bil
198 | tmax03.bil
198 | tmax04.bil
198 | tmax05.bil
198 | tmax06.bil
198 | tmax07.bil
198 | tmax08.bil
198 | tmax09.bil
198 | tmax10.bil
198 | tmax11.bil
198 | tmax12.bil
(12 rows)
5. Withthisapproach,usingthe filename field,youcouldusethe ST_Value
PostGISrasterfunctiontogettheaveragemonthlymaximumtemperatureof
a certain geographic zone for the whole year:
SELECT REPLACE(REPLACE(filename, 'tmax',
''), '.bil', '') AS month,
(ST_VALUE(rast,
ST_SetSRID(ST_Point(12.49, 41.88), 4326))/
10) AS tmax
FROM chp01.tmax_2012
WHERE rid IN (
SELECT rid FROM
chp01.tmax_2012
WHERE
ST_Intersects(ST_Envelope(rast),
ST_SetSRID(ST_Point(12.49, 41.88), 4326))
)
ORDER BY month;
month | tmax
-------+------
01 | 11.8
02 | 13.2
03 | 15.3
Search WWH ::




Custom Search