From: Regina Obe Date: Mon, 1 Oct 2012 23:13:29 +0000 (+0000) Subject: #1938 document addition of addbandarg and swap out old example with example utilizing... X-Git-Tag: 2.1.0beta2~598 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e3f7942616901c1695285bbef71458d8d52eee0;p=postgis #1938 document addition of addbandarg and swap out old example with example utilizing addbandarg git-svn-id: http://svn.osgeo.org/postgis/trunk@10359 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index 72e4e3d7c..ca9a67cad 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -954,6 +954,7 @@ WHERE short_name = 'GTiff') As g; For the version that takes an array of bands if torast is NULL, then the fromband band of each raster in the array is accumulated into a new raster. + Enhanced: 2.1.0 support addbandarg was introduced. @@ -968,8 +969,15 @@ WHERE rid = 1; -- Create an empty raster 100x100 units, with upper left right at 0, add 2 bands (band 1 is 0/1 boolean bit switch, band2 allows values 0-15) +-- uses addbandargs INSERT INTO dummy_rast(rid,rast) - VALUES(10, ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 1, -1, 0, 0, 0), '1BB'::text), '4BUI'::text) ); + VALUES(10, ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 1, -1, 0, 0, 0), + ARRAY[ + ROW(1, '1BB'::text, 0, NULL), + ROW(2, '4BUI'::text, 0, NULL) + ]::addbandarg[] + ) + ); -- output meta data of raster bands to verify all is right -- SELECT (bmd).*