From: Regina Obe Date: Tue, 17 May 2011 00:40:44 +0000 (+0000) Subject: First draft of ST_ASPNG doco. Need some more examples and perhaps even pictures. X-Git-Tag: 2.0.0alpha1~1650 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb7e058b91a1e295140ed6d56555bbc074598cdb;p=postgis First draft of ST_ASPNG doco. Need some more examples and perhaps even pictures. git-svn-id: http://svn.osgeo.org/postgis/trunk@7161 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index 1660293a1..58ab7cd19 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -3023,6 +3023,88 @@ FROM dummy_rast WHERE rid=1; + + + + + ST_AsPNG + Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If no band is specified, band 1 is assumed. + + + + + + bytea ST_AsPNG + raster rast + + + bytea ST_AsPNG + raster rast + text[] options + + + bytea ST_AsPNG + raster rast + integer nband + + + bytea ST_AsPNG + raster rast + integer nband + integer compression + + + bytea ST_AsPNG + raster rast + integer nband + text[] options + + + bytea ST_AsPNG + raster rast + integer[] nbands + + + bytea ST_AsPNG + raster rast + integer[] nbands + integer compression + + + bytea ST_AsPNG + raster rast + integer[] nbands + text[] options + + + + + + Description + + Returns the selected bands of the raster as a single Portable Network Graphics Image (PNG). There are many variants of the function with many options. These are itemized below: + + + nband is for single band exports. + + + 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. + + + + + + Examples + + SELECT ST_AsPNG(rast) As rastpng +FROM dummy_rast WHERE rid=1; + + +