Database Reference
In-Depth Information
(180d 0' 0.00"E, 60d0' 0.00"S)
Center ( 0.0000000, 15.0000000)
( 0d 0' 0.00"E, 15d0' 0.00"N)
Band 1 Block=2160x1 Type=Int16,
ColorInterp=Undefined
Min=-153.000 Max=441.000
NoData Value=-9999
2. The gdalinfo command provides a series of useful information about the
raster,forexample,theGDALdriverbeingusedtoreadit,thefilescompos-
ing it (in this case, two files with a .bil and .hdr extension), the size in
pixels(2160x900),thespatialreference(WGS84),thegeographicextents,
the origin and the pixel size (needed to correctly georeference the raster),
andforeachrasterband(justoneinthecaseofthisfile),somestatisticalin-
formationliketheminandmaxvalue(-153.000and441.000,corresponding
toatemperatureof-15.3°Cand44.1°C.Valuesareexpressedastemper-
ature * 10 in °C, according to the documentation available at worldclim.org ) .
3. Usethe raster2pgsql filetogeneratethe .sql dumpfileandthenimport
the raster in PostGIS:
$ raster2pgsql -I -C -F -t 100x100 -s
4326 worldclim/tmax01.bil chp01.tmax01 >
tmax01.sql
$ psql -d postgis_cookbook -U me -f
tmax01.sql
If you are in Linux, you may pipe the two commands in a unique line:
$ raster2pgsql -I -C -M -F -t 100x100
worldclim/tmax1.bil chp01.tmax01 | psql
-d postgis_cookbook -U me -f tmax01.sql
4. Check how the new table has been created in PostGIS:
$ pg_dump -t chp01.tmax01 --schema-only
-U me postgis_cookbook
...
CREATE TABLE tmax01 (
Search WWH ::




Custom Search