]> granicus.if.org Git - postgis/commitdiff
update ST_MapAlgebra to agree with implementation (got rid of bosolete proto and...
authorRegina Obe <lr@pcorp.us>
Sun, 24 Jul 2011 08:15:59 +0000 (08:15 +0000)
committerRegina Obe <lr@pcorp.us>
Sun, 24 Jul 2011 08:15:59 +0000 (08:15 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7667 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_raster.xml

index e168401a901a92a4fec118344537393a465a15cf..56f59681ba46d778194c62bbe923a6cf85043eab 100644 (file)
@@ -4880,13 +4880,6 @@ WHERE A.rid =2 ) As foo;
                                        <paramdef choice='opt'><type>text </type> <parameter>nodatavalueexpr=NULL</parameter></paramdef>
                                        <paramdef choice='opt'><type>text </type> <parameter>pixeltype=same_as_source</parameter></paramdef>
                                  </funcprototype>
-                                 
-                                 <funcprototype>
-                                       <funcdef>raster <function>ST_MapAlgebra</function></funcdef>
-                                       <paramdef><type>raster </type> <parameter>rast</parameter></paramdef>
-                                       <paramdef><type>text </type> <parameter>expression</parameter></paramdef>
-                                       <paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef>
-                                 </funcprototype>
                                </funcsynopsis>
                        </refsynopsisdiv>
                
@@ -4925,11 +4918,11 @@ WHERE rid = 2;
      254 |      0
      254 |      0
                                </programlisting>
-                               <para>Create a new 1 band raster of pixel-type 2BUI from our original that is reclassified.</para>
+                               <para>Create a new 1 band raster of pixel-type 2BUI from our original that is reclassified and set the nodata value to be 0.</para>
                                <programlisting>ALTER TABLE dummy_rast ADD COLUMN map_rast2 raster;
 UPDATE dummy_rast SET map_rast2 = ST_MapAlgebra(rast,'CASE WHEN rast BETWEEN 100 and 250 THEN 1 
 WHEN rast = 252 THEN 2 
-WHEN rast BETWEEN 253 and 254 THEN 3 ELSE 0 END', '2BUI') WHERE rid = 2;
+WHEN rast BETWEEN 253 and 254 THEN 3 ELSE 0 END', '0', '2BUI') WHERE rid = 2;
 
 SELECT DISTINCT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast2, 1, i, j) As mapval
 FROM dummy_rast CROSS JOIN generate_series(1, 5) AS i CROSS JOIN generate_series(1,5) AS j