Class OmsZonalStats
- java.lang.Object
-
- org.hortonmachine.gears.libs.modules.HMModel
-
- org.hortonmachine.gears.modules.r.summary.OmsZonalStats
-
public class OmsZonalStats extends HMModel
-
-
Field Summary
Fields Modifier and Type Field Description org.geotools.coverage.grid.GridCoverage2DinRasterorg.geotools.data.simple.SimpleFeatureCollectioninVectororg.geotools.data.simple.SimpleFeatureCollectionoutVectordoublepPercentageThresDoublepTotalMean
-
Constructor Summary
Constructors Constructor Description OmsZonalStats()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.geotools.feature.simple.SimpleFeatureBuildercreateFeatureBuilder(org.opengis.referencing.crs.CoordinateReferenceSystem crs, boolean hasUserTotalMean)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)voidprocess()protected voidprocessCell(int readCol, int readRow, int writeCol, int writeRow, int readCols, int readRows, int writeCols, int writeRows)-
Methods inherited from class org.hortonmachine.gears.libs.modules.HMModel
checkCancel, checkFileExists, checkNull, checkWorkingFolderInPath, concatOr, dumpRaster, dumpVector, getDefaultThreadsNum, getRaster, getVector, help, isCanceled, template
-
-
-
-
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
-
-
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. Ifnullan 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)
-
-