Database Reference
In-Depth Information
If you decide to include the -t option, then you will cut the original raster in tiles,
eachinsertedasasinglerowintherastertable.Inthiscase,youdecidedtocutthe
raster in 100x100 tiles, resulting in 198 table rows in the raster table.
Anotherimportantoptionis -R ,whichwillregistertherasteras out-of-db ;insuch
acase,onlythemetadatawillbeinsertedinthedatabase,whiletherasterwillbeout
of the database.
Therastertablecontainsanidentifierforeachrow,therasteritself(eventuallyone
of its tiles, if using the -t option), and eventually the original filename, if you used
the -F option, as in this case.
You can analyze the PostGIS raster using SQL commands or the gdalinfo com-
mand. Using SQL, you can query the raster_columns view for getting the most
significant raster metadata (spatial reference, band number, scale, block size, and
so on).
With gdalinfo , you can access the same information, using a connection string
with the following syntax:
gdalinfo PG":host=localhost port=5432
dbname=postgis_cookbook user=me
password=mypassword schema='chp01'
table='tmax01' mode=2"
The mode parameterisnotinfluentialifyouloadedthewholerasterasasingleblock
(for example, if you did not specify the -t option). But, as in the use case of this
recipe,ifyousplititintiles, gdalinfo willseeeachtileasasinglesubdatasetwith
the default behavior ( mode=1 ). If you want GDAL to consider the raster table as a
unique raster dataset, you have to specify the mode option and explicitly set it to 2 .
Search WWH ::




Custom Search