Database Reference
In-Depth Information
The following is a PNG image generated by applying the "bluered" colormap with
ST_ColorMap()
and
ST_AsPNG()
. The pixels in red represent the steepest
slopes.
Inouruseof
ST_AsTIFF()
and
ST_AsPNG()
,wepassedtherastertobeconverted
asthesoleargument.Bothofthesefunctionshaveadditionalparameterstocustom-
ize the output TIFF or PNG file. These additional parameters include various com-
pression and data organization settings.
How it works...
Using
ST_AsTIFF()
and
ST_AsPNG()
, we exported rasters from PostGIS to
GeoTIFFandPNG.The
ST_ColorMap()
functionhelpedgenerateimagesthatcan
beopenedinanyimageviewer.Ifweneededtoexporttheseimagestoadifferent
format supported by GDAL, we would use
ST_AsGDALRaster()
.