Class BilinearInterpolationResampling

java.lang.Object
org.esa.snap.core.dataop.resamp.BilinearInterpolationResampling
All Implemented Interfaces:
Resampling

public final class BilinearInterpolationResampling extends Object implements Resampling
  • Constructor Details

    • BilinearInterpolationResampling

      public BilinearInterpolationResampling()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Resampling
      Gets a unique identifier for this resampling method, e.g. "BILINEAR_INTERPOLATION".
      Specified by:
      getName in interface Resampling
      Returns:
      a unique name
    • createIndex

      public final Resampling.Index createIndex()
      Description copied from interface: Resampling
      Factory method which creates an appropriate index for raster access.
      Specified by:
      createIndex in interface Resampling
      Returns:
      an appropriate index, never null
    • computeIndex

      public final void computeIndex(double x, double y, int width, int height, Resampling.Index index)
      Description copied from interface: Resampling
      Computes the index's properties for the given pixel coordinate.
      Specified by:
      computeIndex in interface Resampling
      Parameters:
      x - the raster's x coordinate
      y - the raster's y coordinate
      width - the raster's width
      height - the raster's height
      index - the index object to which the results are to be assigned
    • resample

      public final double resample(Resampling.Raster raster, Resampling.Index index) throws Exception
      Description copied from interface: Resampling
      Performs the actual resampling operation. If a sample value could not be computed at the given index, e.g. in case of missing data, the method returns the special value Float.NaN.
      Specified by:
      resample in interface Resampling
      Parameters:
      raster - the raster
      index - the index, must be computed using the Resampling.computeIndex(double, double, int, int, org.esa.snap.core.dataop.resamp.Resampling.Index) method
      Returns:
      either the re-sampled sample value or Float.NaN.
      Throws:
      Exception - if a non-runtime error occurs, e.g I/O error
    • toString

      public String toString()
      Overrides:
      toString in class Object