Ticket #866 (closed defect: fixed)
[raster] Change the ST_MapAlgebra nodatavalueexpr text parameter to nodataval double precision
|Reported by:||pracine||Owned by:||dustymugs|
The original plan to support refering to neighbour pixel in Mapalgebra was to refer to them using their position relative to the pixel being compute. e.g.: "rast[-1,0] + 1" rast[-1,0] refering to the first pixel at the left of the pixel being computed. This prove to be hard to use when the desired neighbour area include most pixels of an area larger than the first neighbour.
The better alternative is to propose a variant to ST_MapAlgebra named ST_MapAlgebraNgb which would pass a vector of value (or a small raster) to a user defined summarizing function that would return the value to be assigned to the pixel.
The original ST_MapAlgebra nodatavalueexpr text parameter was intented to give a way to provide an alternative expression in case one pixel value refered by the relative neighbour syntax (rast[-1,0]) would be nodata.
Since this syntax will not be offered/implemented there is no more need for a nodatavalueexpr, a more simple nodatavaluereplacement value is sufficient.