Database Reference
In-Depth Information
scale_y, blocksize_x, blocksize_y,
num_bands, pixel_types, nodata_values,
out_db FROM raster_columns where
r_table_schema='chp01' AND r_table_name
='tmax_2012';
r_raster_column | srid | scale_x |
scale_y | blocksize_x | blocksize_y |
num_bands | pixel_types | nodata_values |
out_db-----------------+------+---------+---------+-------------+-------------+-----------+-------------+---------------+--------rast
| 4326 | 0.17 | -0.17 | 100
| 100 | 1 | {16BUI} |
{0} | {f}
(1 row)
3. Check some raster statistics using the ST_MetaData function:
SELECT rid, (foo.md).*
FROM (SELECT rid, ST_MetaData(rast)
As md FROM chp01.tmax_2012) As foo;
Note
Note that there is a different metadata for each raster record loaded in
the table.
4. If you now query the table, you would be able to derive the month for each
rasterrowonlyfromthe original_file column.Inthetable,youhaveim-
ported 198 distinct records (raster) for each of the 12 original files (we di-
videdtheminto100x100blocks,ifyouremember).Testthiswiththefollow-
ing query:
postgis_cookbook=# SELECT COUNT(*) AS
num_raster, MIN(filename) as
original_file FROM chp01.tmax_2012
GROUP BY filename ORDER BY filename;
num_raster | original_file
Search WWH ::




Custom Search