Package org.esa.snap.core.dataop.resamp
Class BilinearInterpolationResampling
java.lang.Object
org.esa.snap.core.dataop.resamp.BilinearInterpolationResampling
- All Implemented Interfaces:
Resampling
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.esa.snap.core.dataop.resamp.Resampling
Resampling.Index, Resampling.Raster -
Field Summary
Fields inherited from interface org.esa.snap.core.dataop.resamp.Resampling
BICUBIC_INTERPOLATION, BILINEAR_INTERPOLATION, BISINC_11_POINT_INTERPOLATION, BISINC_21_POINT_INTERPOLATION, BISINC_5_POINT_INTERPOLATION, CUBIC_CONVOLUTION, NEAREST_NEIGHBOUR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidcomputeIndex(double x, double y, int width, int height, Resampling.Index index) Computes the index's properties for the given pixel coordinate.final Resampling.IndexFactory method which creates an appropriate index for raster access.getName()Gets a unique identifier for this resampling method, e.g.final doubleresample(Resampling.Raster raster, Resampling.Index index) Performs the actual resampling operation.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.esa.snap.core.dataop.resamp.Resampling
computeCornerBasedIndex, getKernelSize
-
Constructor Details
-
BilinearInterpolationResampling
public BilinearInterpolationResampling()
-
-
Method Details
-
getName
Description copied from interface:ResamplingGets a unique identifier for this resampling method, e.g. "BILINEAR_INTERPOLATION".- Specified by:
getNamein interfaceResampling- Returns:
- a unique name
-
createIndex
Description copied from interface:ResamplingFactory method which creates an appropriate index for raster access.- Specified by:
createIndexin interfaceResampling- Returns:
- an appropriate index, never null
-
computeIndex
Description copied from interface:ResamplingComputes the index's properties for the given pixel coordinate.- Specified by:
computeIndexin interfaceResampling- Parameters:
x- the raster's x coordinatey- the raster's y coordinatewidth- the raster's widthheight- the raster's heightindex- the index object to which the results are to be assigned
-
resample
Description copied from interface:ResamplingPerforms 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 valueFloat.NaN.- Specified by:
resamplein interfaceResampling- Parameters:
raster- the rasterindex- the index, must be computed using theResampling.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
-