Syntax FACTORY_DEF * RasterStatisticsFactory FACTORY_NAME $(XFORMER_NAME) $(INPUT_LINES) RASTER_LEVEL (BAND_ONLY|PALETTE_ONLY|BAND_AND_PALETTE) RASTER_STATS [ []*]+ OUTPUT OUTPUT FEATURE_TYPE $(OUTPUT_OUTPUT_FTYPE) $(OUTPUT_OUTPUT_FUNCS) OUTPUT FEATURE_TYPE $(OUTPUT__FTYPE) $(OUTPUT__FUNCS) Overview This factory takes in a raster feature and calculates the user requested statistics. Statistics are calculated on raster components/bands. Input features must contain raster geometries only. The following statistics may be calculated: - Minimum: The numerical minimum for numeric components, or the lexical minimum for string components. - Maximum: The numerical maximum for numeric components, or the lexical maximum for string components. - Range: The maximum minus the minimum. Undefined for string components. - Mean: The average value, calculated as the sum of values divided by the number of cells. Undefined for string components. - Standard Deviation: The standard deviation as measured by the "nonbiased" or "n-1" method. Undefined for string components. - Sum: The sum of all values. Undefined for string components. - Median: The middle value when the values are listed in order if the number of cells is odd, or the average of the two middle values if the number of cells is even. For string components, the first middle value is always used. - Mode: The most frequent of all the values. If the dataset is bimodal (two or more values occur with the highest frequency) one of the values will be returned randomly. - Value Count: The number of items (cells) ignoring nodata values. Statistics will be stored as attributes on the feature. Attributes will be named "band." for stats calculated on bands, and "band.palette{}." for stats calculated on palettes where statistic is one of the following: min, max, range, mean, stdev, sum, median, mode For example, if median was calculated for band "0", then an attribute named "band0.median" would be added to the feature. If stdev was calculated for band "0" and its palettes, the attributes named "band0.stdev" and "band0.palette{0}.stdev" would be added to the feature. The RASTER_LEVEL clause accepts one of the three folowwing parameter values: BAND_ONLY PALETTE_ONLY BAND_AND_PALETTE If the RASTER_LEVEL clause is specified as BAND_ONLY, then statistics will be calculated on band values only. If the band has a palette, statistics will be calculated on the band's keys. If the RASTER_LEVEL clause is specified as PALETTE_ONLY, the statistics will be calculated on the resolved palette values of the band. For example an attribute for a RGB palette will be a triplet of values (eg. band0.palette{0}.max = 255,255,255). Bands without palettes will not have statistics calculated on them. If the RASTER_LEVEL clause is specified as BAND_AND_PALETTE, then statistics for both band values and resolved palette values will be calculated for every band. The resulting attributes will be the union of BAND_ONLY and PALETTE_ONLY attributes. The RASTER_STATS clause takes in a list of band indices and statistics names. The list will begin with a band index followed by the stats to calculate on that band, and then potentially followed by another band index, and its stats, and so on. (eg: {"0", "MIN", "MAX", "2", "RANGE", "MEAN", "STDEV", "MODE", 5, "VALUE_COUNT"} Output Tags The RasterStatisticsFactory supports the following output tag. OUTPUT Output raster feature with calculated statistics exposed as attributes. The raster geometry on feature will not be altered. The output feature that is deemed to be invalid input for any of the following reasons: - The feature does not have a raster as its geometry - The raster does not have any bands