From: Regina Obe Date: Sun, 24 Jul 2011 08:15:59 +0000 (+0000) Subject: update ST_MapAlgebra to agree with implementation (got rid of bosolete proto and... X-Git-Tag: 2.0.0alpha1~1179 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b8670820c56f6b6bdc6ccd43102988803a1d4ee;p=postgis update ST_MapAlgebra to agree with implementation (got rid of bosolete proto and example and replaced with new example git-svn-id: http://svn.osgeo.org/postgis/trunk@7667 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index e168401a9..56f59681b 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -4880,13 +4880,6 @@ WHERE A.rid =2 ) As foo; text nodatavalueexpr=NULL text pixeltype=same_as_source - - - raster ST_MapAlgebra - raster rast - text expression - text pixeltype - @@ -4925,11 +4918,11 @@ WHERE rid = 2; 254 | 0 254 | 0 - Create a new 1 band raster of pixel-type 2BUI from our original that is reclassified. + Create a new 1 band raster of pixel-type 2BUI from our original that is reclassified and set the nodata value to be 0. 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