Database Reference
In-Depth Information
nodata_values,
out_db,
ST_AsText(extent) AS extent
FROM raster_columns WHERE r_table_name =
'prism';
The SQL query returns a record similar the following:
r_table_name | r_raster_column | srid
| scale_x
-----------------+-----------------+------+-------------------prism
| rast | 4322 | 0.041666666666667
Ifyoulookbackatthe gdalinfo outputforoneofthePRISMrasters,you'llseethat
thevaluesforthescales(thepixelsize)match.Theflagspassedto raster2pgsql ,
specifyingtile size and SRID , worked.
Let's see what the metadata of a single raster tile looks like. We will use the
ST_Metadata() function.
SELECT rid, (ST_Metadata(rast)).*
FROM prism
WHERE month_year = '2012-06-01'::date
LIMIT 1;
The output will look similar to the following:
rid | upperleftx | upperlefty |
width | height
-----+------------------+------------------+-------+--------
550 | -87.520833333333 | 45.7708333333335 |
100 | 100
Use ST_BandMetadata() to examine the first and only band of raster tile at the
record ID 550 .
Search WWH ::




Custom Search