Database Reference
In-Depth Information
name
| tmax_jan
--------------------------------------------+----------
Greenland
| -29.8
...
Korea
| -8.5
Democratic People's Republic of
Kyrgyzstan | -7.9
Finland
| -6.8
(10 rows)
How it works...
The
raster2pgsql
command is able to load any raster formats supported by
GDALinPostGIS.YoucanhaveaformatlistsupportedbyyourGDALinstallationby
typing the following command:
$ gdalinfo -formats
Inthisrecipe,youhavebeenimportingonerasterfileusingsomeofthemostcom-
mon
raster2pgsql
options:
$ raster2pgsql -I -C -F -t 100x100 -s 4326
worldclim/tmax01.bil chp01.tmax01 > tmax01.sql
The
-I
optioncreatesaGISTspatialindexfortherastercolumn.The
-C
optionwill
create the standard set of constraints after the rasters have been loaded. The
-F
optionwilladdacolumnwiththefilenameoftherasterthathasbeenloaded.Thisis
usefulwhenyouareappendingmanyrasterfilestothesamePostGISrastertable.
The
-s
option sets the raster's SRID.