Class OmsKernelFilter
- java.lang.Object
-
- org.hortonmachine.gears.libs.modules.HMModel
-
- org.hortonmachine.gears.modules.r.filter.OmsKernelFilter
-
public class OmsKernelFilter extends HMModel
-
-
Constructor Summary
Constructors Constructor Description OmsKernelFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double[]averageSmooth(double[] values, int lookAhead)Smooth an array of values with an averaging moving window.static double[]gaussianSmooth(double[] values, int kernelRadius)Smooth an array of values with a gaussian blur.static double[]makeGaussianKernel(int radius)Make a Gaussian blur kernel.voidprocess()-
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
-
pKernel
public String pKernel
-
pRadius
public int pRadius
-
outRaster
public org.geotools.coverage.grid.GridCoverage2D outRaster
-
-
Method Detail
-
gaussianSmooth
public static double[] gaussianSmooth(double[] values, int kernelRadius) throws ExceptionSmooth an array of values with a gaussian blur.- Parameters:
values- the values to smooth.kernelRadius- the radius of the kernel to use.- Returns:
- the smoothed values.
- Throws:
Exception
-
averageSmooth
public static double[] averageSmooth(double[] values, int lookAhead) throws ExceptionSmooth an array of values with an averaging moving window.- Parameters:
values- the values to smooth.lookAhead- the size of half of the window.- Returns:
- the smoothed values.
- Throws:
Exception
-
makeGaussianKernel
public static double[] makeGaussianKernel(int radius)
Make a Gaussian blur kernel.
-
-