Class Interpolate

  extended byorg.geotools.coverage.processing.AbstractOperation
      extended byorg.geotools.coverage.processing.Operation2D
          extended byorg.geotools.coverage.processing.operation.Interpolate
All Implemented Interfaces:
Direct Known Subclasses:

public class Interpolate
extends Operation2D

Specifies the interpolation type to be used to interpolate values for points which fall between grid cells. The default value is nearest neighbor. The new interpolation type operates on all sample dimensions. Possible values for type are: , and (the interpolation type is currently not supported).

Geotools extension:
The Geotools implementation provides two extensions to OpenGIS specification: First, it accepts also an Interpolation argument type, for interoperability with Java Advanced Imaging. Second, it accepts also an array of String or Interpolation objects. When an array is specified, the first interpolation in the array is applied. If this interpolation returns a value, then the second interpolation is tried as a fallback. If the second interpolation returns also a value, then the third one is tried and so on until an interpolation returns a real number or until we reach the end of interpolation list. This behavior is convenient when processing remote sensing images of geophysics data, for example Sea Surface Temperature (SST), in which clouds may mask many pixels (i.e. set them to some values). Because interpolation needs 4×4 pixels while interpolation needs only 2x2 pixels, the interpolation is less likely to fails because of clouds ( values) than the one (note: only one value is enough to make an interpolation fails). One can workaround the problem by trying a bicubic interpolation first, then a linear interpolation if failed at a particular location, etc. This behavior can be specified with the following argument: new String[]{"Bicubic", "Bilinear", "NearestNeighbor"}.

Name: "Interpolate"
JAI operator: N/A

Name Class Default value Minimum value Maximum value
GridCoverage2D N/A N/A N/A
CharSequence "NearestNeighbor" N/A N/A

$Id: 17672 2006-01-19 00:25:55Z desruisseaux $
Martin Desruisseaux
See Also:
Operations.interpolate(org.opengis.coverage.grid.GridCoverage, java.lang.String), Interpolator2D, Serialized Form

Field Summary
static org.opengis.parameter.ParameterDescriptor TYPE
          The parameter descriptor for the interpolation type.
Fields inherited from class org.geotools.coverage.processing.Operation2D
Fields inherited from class org.geotools.coverage.processing.AbstractOperation
Constructor Summary
          Constructs an operation.
Method Summary
protected  org.opengis.coverage.Coverage doOperation(org.opengis.parameter.ParameterValueGroup parameters, Hints hints)
          Applies an interpolation to a grid coverage.
Methods inherited from class org.geotools.coverage.processing.Operation2D
getFactory, getGridCoverageProcessor
Methods inherited from class org.geotools.coverage.processing.AbstractOperation
ensureNonNull, equals, getDescription, getDocURL, getName, getNumSources, getParameters, getProcessor, getVendor, getVersion, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail


public static final org.opengis.parameter.ParameterDescriptor TYPE
The parameter descriptor for the interpolation type.

Constructor Detail


public Interpolate()
Constructs an operation.

Method Detail


protected org.opengis.coverage.Coverage doOperation(org.opengis.parameter.ParameterValueGroup parameters,
                                                    Hints hints)
Applies an interpolation to a grid coverage. This method is invoked by DefaultProcessor for the operation.

Specified by:
doOperation in class AbstractOperation
parameters - List of name value pairs for the parameters required for the operation.
hints - A set of rendering hints, or if none. The may provides hints for the following keys: Hints.COORDINATE_OPERATION_FACTORY and Hints.JAI_INSTANCE.
The result as a coverage.

Copyright © GeoTools. All Rights Reserved.