From: Regina Obe Date: Tue, 17 May 2011 02:06:59 +0000 (+0000) Subject: Document ST_AsGDALRaster X-Git-Tag: 2.0.0alpha1~1648 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47a597dbeb057c9a806b6a564eb413d4b0eb449b;p=postgis Document ST_AsGDALRaster git-svn-id: http://svn.osgeo.org/postgis/trunk@7163 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index d02f94001..0f794c273 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -3025,6 +3025,83 @@ FROM dummy_rast WHERE rid=1; + + + ST_AsGDALRaster + Return the raster tile in the designated GDAL Raster format. Raster formats are one of those supported by your compiled library. Use ST_GDALRasters() to get a list of formats supported by your library. + + + + + + bytea ST_AsGDALRaster + raster rast + text format + + + bytea ST_AsGDALRaster + raster rast + text format + text[] options + + + bytea ST_AsGDALRaster + raster rast + text format + text[] options + text srs + + + + + + + Description + + Returns the raster tile in the designated format. Arguments are itemized below: + + + format format to output. This is dependent on the drivers compiled in your libgdal library. Generally available are 'JPEG', 'GTIff', 'PNG'. Use ST_GDALRasters() to get a list of formats supported by your library. + + options text array of GDAL options. Valid options are dependent on the format. Refer to GDAL Raster format options for more details. + srs The proj4text or srtext (from spatial_ref_sys) to embed in the image + + Availability: 2.0.0 - requires GDAL >= 1.6.0. + + + + JPEG Output Examples + + SELECT ST_AsGDALRaster(rast, 'JPEG') As rastjpg +FROM dummy_rast WHERE rid=1; + +SELECT ST_AsGDALRaster(rast, 'JPEG', ARRAY!['QUALITY=50']) As rastjpg +FROM dummy_rast WHERE rid=2; + + + + + + GTIFF Output Examples + + SELECT ST_AsGDALRaster(rast, 'GTiff') As rastjpg +FROM dummy_rast WHERE rid=2; + +SELECT ST_AsGDALRaster(rast, 'GTiff', + ARRAY['COMPRESS=JPEG', 'JPEG_QUALITY=90'], + '+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs') As rasttiff +FROM dummy_rast WHERE rid=2; + + + + + + + See Also + + + + ST_AsPNG @@ -3091,8 +3168,8 @@ FROM dummy_rast WHERE rid=1; nbands is an array of bands to export (note that max is 3 for PNG) and the order of the bands is RGB. e.g ARRAY[3,2,1] means map band 3 to Red, band 2 to greeen and band 1 to blue compression number from 1 to 9. The higher the number the greater the compression. - options text Array of GDAL options for PNG valid one is only ZLEVEL (amount of time to spend on compression -- default 6) e.g. ARRAY['ZLEVEL=9']. - WORLDFILE is not allowed since the function would have to output two outputs. Refer to GDAL Raster format options form more details. + options text Array of GDAL options. For PNG valid one is only ZLEVEL (amount of time to spend on compression -- default 6) e.g. ARRAY['ZLEVEL=9']. + WORLDFILE is not allowed since the function would have to output two outputs. Refer to GDAL Raster format options for more details. Availability: 2.0.0 - requires GDAL >= 1.6.0. @@ -3102,7 +3179,7 @@ FROM dummy_rast WHERE rid=1; Examples SELECT ST_AsPNG(rast) As rastpng -FROM dummy_rast WHERE rid=1; +FROM dummy_rast WHERE rid=2;