Database Reference
In-Depth Information
Getting and loading rasters
Inthisrecipe,weloadmostoftherastersusedinthischapter.Theserastersareex-
amplesofsatelliteimageryandmodel-generatedsurfaces,twoofthemostcommon
raster sources.
Getting ready
If you have not done soalready, createa directory and copy the chapter's datasets.
> mkdir C:\postgis_cookbook\data\chap05
> cp -r /path/to/book_dataset/chap05
C:\postgis_cookbook\data\chap05
You should also create a new schema for this chapter in the database.
> psql -d postgis_cookbook -c "CREATE SCHEMA
chap5"
How to do it...
We will start with the PRISM average monthly minimum-temperature raster dataset
for2012withcoveragefortheContinentalUnitedStates.Therasterisprovidedbythe
PRISMClimateGroupatOregonStateUniversity,withadditionalrastersavailableat
http://www.prism.oregonstate.edu/mtd/ .
On the command line, navigate to the PRISM directory as follows:
> cd C:\postgis_cookbook\data\chap05\PRISM
Letusspot-checkoneofthePRISMrasterswiththeGDALutility gdalinfo .Itisal-
waysagoodpracticetoinspectatleastonerastertogetanideaofthemetadataand
ensurethattherasterdoesnothaveanyissues.Thiscanbedoneusingthefollowing
command:
Search WWH ::




Custom Search