Changes between Version 39 and Version 40 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
Mar 14, 2011, 11:56:15 AM (13 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v39 v40  
    203203An alternative syntax would involve another function name (e.g. ST_MapAlgebraNgb) and a way to define a neighbour rectangular region around the computed pixel (e.g.: "2,2" meaning a rectangle encompassing the two neighbour pixels in each direction) and a function to call with this matrix of pixel values. A complete example might look like:
    204204
    205 SELECT ST_MapAlgebraNgb(rast, "ST_Avg", 2, 2, "ignore")
     205SELECT ST_MapAlgebraNgb(rast, "ST_Mean", 2, 2, "ignore")
    206206
    207207So this would mean "for each pixel, compute the average of all the 1 + 8 + 16 = 25 pixels surrounding the current pixel and "ignore" pixels with nodata values."
    208208
    209 The "ST_Avg" summarizing function should accept three parameters: an array of float8 values, a X and a Y dimension, and optionnally a "what to do with nodata values". The possible value for this last parameter could be:
     209The "ST_Mean" summarizing function should accept three parameters: an array of float8 values, a X and a Y dimension, and optionnally a "what to do with nodata values". The possible value for this last parameter could be:
    210210
    211211 * "NULL": If any value is a nodata value, return NULL.
    212212 * "ignore": Ignore any nodata value so that if 4 pixels on 25 are nodata values, do the computation with the 21 remaining.
     213 * "value": Replace any nodata value with the value of the pixel being computed.
    213214 * a value: Replace any nodata value with this value and compute.
    214215
    215216Any remaining parameters to ST_MapAlgebraNgb could be passed to the summarizing functions for its own need (e.g. "round" to specify that only the pixel forming a circle should be used in the computing).
    216217
    217 A number of predefined summarizing function could be delivered: ST_Average, ST_Majority, ST_Slope, ST_Aspect,
     218A number of predefined summarizing function could be delivered: ST_Sum, ST_Distinct, ST_Mean, ST_STD, ST_Max, ST_Min, ST_Range, ST_Median, ST_Majority, ST_Minority, ST_Slope, ST_Aspect,
    218219
    219220Users could write their own map algebra summarizing functions.