Class RasterZonalStatistics2

  • All Implemented Interfaces:
    RasterProcess

    public class RasterZonalStatistics2
    extends Object
    implements RasterProcess
    This class wraps the "ZonalStats2" OperationJAI and executes the selected operation with the defined parameters. No transformation of the optional classifier image is needed because inside the process the classifier image is already transformed by the GridCoverage2DRIA operation. By default the input band is set 0, and the statistics to MEAN, MAX, MIN, EXTREMA, VARIANCE, STANDARD DEVIATION.

    The main difference between this class and RasterZonalStatistics is the fact that this operation will calculate the requested statistics for all the SimpleFeatures in a single step, without having to iterate on the features.

    This Process is a simple wrapper of the ZonalStatistics operation

    Author:
    geosolutions
    • Constructor Detail

      • RasterZonalStatistics2

        public RasterZonalStatistics2()
    • Method Detail

      • execute

        public List<ZoneGeometry> execute​(GridCoverage2D coverage,
                                          int[] bands,
                                          List<SimpleFeature> zones,
                                          GridCoverage2D classifier,
                                          Range nodata,
                                          Geometry mask,
                                          boolean useROIAccessor,
                                          Polygon roi,
                                          Statistics.StatsType[] stats,
                                          double[] minbounds,
                                          double[] maxbounds,
                                          int[] numbins,
                                          List<Range> rangeData,
                                          boolean localStats)