Class OmsZonalStats


  • public class OmsZonalStats
    extends HMModel
    • Field Detail

      • inRaster

        public org.geotools.coverage.grid.GridCoverage2D inRaster
      • inVector

        public org.geotools.data.simple.SimpleFeatureCollection inVector
      • pPercentageThres

        public double pPercentageThres
      • pTotalMean

        public Double pTotalMean
      • outVector

        public org.geotools.data.simple.SimpleFeatureCollection outVector
    • Constructor Detail

      • OmsZonalStats

        public OmsZonalStats()
    • Method Detail

      • polygonStats

        public static double[] polygonStats​(org.locationtech.jts.geom.Geometry geometry,
                                            org.geotools.coverage.grid.GridGeometry2D gridGeometry,
                                            javax.media.jai.iterator.RandomIter inIter,
                                            double novalue,
                                            boolean hasUserTotalMean,
                                            double[] tm_utm_tac,
                                            double percentageThres,
                                            IHMProgressMonitor monitor)
                                     throws Exception
        Parameters:
        geometry -
        gridGeometry -
        inIter -
        tm_utm_tac - the array holding:
        • totalMean
        • userTotalMean
        • totalActiveCells
        percentageThres -
        monitor - an optional monitor. If null an exception is thrown in case of cusps, else an errormessage is given, but processing will go on ignoring the geometry.
        Returns:
        Throws:
        Exception
      • createFeatureBuilder

        public static org.geotools.feature.simple.SimpleFeatureBuilder createFeatureBuilder​(org.opengis.referencing.crs.CoordinateReferenceSystem crs,
                                                                                            boolean hasUserTotalMean)
      • processCell

        protected void processCell​(int readCol,
                                   int readRow,
                                   int writeCol,
                                   int writeRow,
                                   int readCols,
                                   int readRows,
                                   int writeCols,
                                   int writeRows)