Database Reference
In-Depth Information
(SELECT rid FROM chp01.tmax_2012_multi
WHERE ST_Intersects(rast,
ST_SetSRID(ST_Point(12.49, 41.88),
4326)));
The output of the preceding command is as follows:
jan | feb | mar | apr | may | jun | jul |
aug | sep | oct | nov | dec
----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+----
11.8| 13.2| 15.3| 18.5| 22.9| 27 | 30 |
29.8| 26.4| 21.7| 16.6|12.9
(1 row)
How it works...
You can import raster datasets in PostGIS usingthe raster2pgsql command.
Note
TheGDALPostGISrastersofardoesnotsupportwritingoperations;therefore,
for now, you cannot use GDAL commands such as gdal_translate and
gdalwarp .
Thisisgoingtochangeinthenearfuture,soyoumayhavesuchanextraoption
when you are reading this chapter.
In a scenario where you have multiple rasters representing the same variable at a
time,asinthisrecipe,itmakessensetostorealloftheoriginalrastersasasingle
tableinPostGIS.Inthisrecipe,wehavethesamevariable(averagemaximumtem-
perature) represented by a single raster for each month. You have seen that you
could proceed in two different ways:
1. Append each single raster (representing a different month) to the same
PostGIS single band raster table and derive the information related to the
Search WWH ::




Custom Search