Class OmsKernelFilter


  • public class OmsKernelFilter
    extends HMModel
    • 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
    • Constructor Detail

      • OmsKernelFilter

        public OmsKernelFilter()
    • Method Detail

      • gaussianSmooth

        public static double[] gaussianSmooth​(double[] values,
                                              int kernelRadius)
                                       throws Exception
        Smooth 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 Exception
        Smooth 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.