From: Regina Obe Date: Sun, 17 Feb 2013 18:37:42 +0000 (+0000) Subject: ST_MapAlgebra: create variablelist and move much of commentary to that so page is... X-Git-Tag: 2.1.0beta2~204 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de31022a2e37bfa0127bee10306ed6e892bfd7d3;p=postgis ST_MapAlgebra: create variablelist and move much of commentary to that so page is more easily digestable git-svn-id: http://svn.osgeo.org/postgis/trunk@11099 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index c5595f21c..454fffc14 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -8517,8 +8517,19 @@ WHERE A.rid =2 ) As foo; Returns a one-band raster given one or more input rasters, band indexes and one user-specified callback function. - - + + + + rast,rast1,rast2, rastbandarg[] + Rasters on which the map algebra process is evaluated.rastbandarg allowing the use of a map algebra operation on many rasters and/or many bands. See example Variant 1. + + + nband, nband1, nband2 + Band numbers of the raster to be evaluated. nband can be an integer or integer[] denoting the bands. nband1 is band on rast1 and nband2 is band on rast2 for hte 2 raster/2band case. + + + callbackfunc + The callbackfunc parameter must be the name and signature of an SQL or PL/pgSQL function, cast to a regprocedure. An example PL/pgSQL function example is: CREATE OR REPLACE FUNCTION sample_callbackfunc(value double precision[][][], position integer[][], VARIADIC userargs text[]) @@ -8543,9 +8554,46 @@ CREATE OR REPLACE FUNCTION sample_callbackfunc(value double precision[][][], pos Note that the argument contains the name of the function, the types of the function arguments, quotes around the name and argument types, and a cast to a regprocedure. - - The third argument to the callbackfunc is a variadic text array. All trailing text arguments are passed through to the specified callbackfunc, and are contained in the userargs argument. - + + + + pixeltype + If pixeltype is passed in, the one band of the new raster will be of that pixeltype. If pixeltype is passed NULL or left out, the new raster band will have the same pixeltype as the specified band of the first raster (for extent types: INTERSECTION, UNION, FIRST, CUSTOM) or the specified band of the appropriate raster (for extent types: SECOND, LAST). If in doubt, always specify pixeltype. + The resulting pixel type of the output raster must be one listed in or left out or set to NULL. + + + + extenttype + + Possible values are INTERSECTION (default), UNION, FIRST (default for one raster variants), SECOND, LAST, CUSTOM. + + + + + customextent + + If extentype is CUSTOM, a raster must be provided for customextent. See example 4 of Variant 1. + + + + distancex + The width of the neighborhood, in cells. If not specified only the reference cell is consider (neighborhood of 0). + + + distancey + The height of the neighborhood, in cells. If not specified only the reference cell is considered (neighborhood of 0) + + + + userargs + + The third argument to the callbackfunc is a variadic text array. All trailing text arguments are passed through to the specified callbackfunc, and are contained in the userargs argument. + + + + + + @@ -8559,13 +8607,6 @@ CREATE OR REPLACE FUNCTION sample_callbackfunc(value double precision[][][], pos - - If pixeltype is passed in, the one band of the new raster will be of that pixeltype. If pixeltype is passed NULL or left out, the new raster band will have the same pixeltype as the specified band of the first raster (for extent types: INTERSECTION, UNION, FIRST, CUSTOM) or the specified band of the appropriate raster (for extent types: SECOND, LAST). If in doubt, always specify pixeltype. - - - - Possible values for extenttype are: INTERSECTION (default), UNION, FIRST (default for one raster variants), SECOND, LAST, CUSTOM. If extentype is CUSTOM, a raster must be provided for customextent. See example 4 of Variant 1. - Variant 1 accepts an array of rastbandarg allowing the use of a map algebra operation on many rasters and/or many bands. See example Variant 1. @@ -9999,7 +10040,7 @@ SELECT ST_MapAlgebraFct(m1.rast, 1, m1.rast, 3, args Arguments to pass into the user function. - + Availability: 2.0.0