]> granicus.if.org Git - postgis/commitdiff
#1938 document addition of addbandarg and swap out old example with example utilizing...
authorRegina Obe <lr@pcorp.us>
Mon, 1 Oct 2012 23:13:29 +0000 (23:13 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 1 Oct 2012 23:13:29 +0000 (23:13 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10359 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_raster.xml

index 72e4e3d7c40bbb4574dc29b99dde5d050a8a79ec..ca9a67cadf296423cd1125ff67c1e7e9ae109332 100644 (file)
@@ -954,6 +954,7 @@ WHERE short_name = 'GTiff') As g;
                                <para>
                                        For the version that takes an array of bands if <varname>torast</varname> is NULL, then the <varname>fromband</varname> band of each raster in the array is accumulated into a new raster.
                                </para>
+                               <para>Enhanced: 2.1.0 support addbandarg was introduced.</para>
                        </refsection> 
 
                        <refsection>
@@ -968,8 +969,15 @@ WHERE rid = 1;
 
                                <programlisting>
 -- 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).*