Skip navigation links

Package org.geotoolkit.coverage.processing

Coverage processor implementations.

See: Description

Package org.geotoolkit.coverage.processing Description

Coverage processor implementations. An explanation for this package is provided in the OpenGIS® javadoc. The remaining discussion on this page is specific to the Geotk implementation.

If the operation to apply is know at compile time, then the easiest way to use this package is to use the Operations convenience class. For example a grid coverage can be resampled to a different coordinate reference system using the following code:

Coverage reprojected = Operations.DEFAULT.resample(myCoverage, newCRS);
If the operation to apply is unknown at compile time, or if the operation is not listed in the Operations convenience class, then the generic way to invoke an operation is described in the operation package. Geotk coverage operations must extend the AbstractOperation class or one of its subclasses. All operations must declare the expected parameters, including source coverages, as an ParameterDescriptorGroup object. The source coverages are ordinary parameters for which the value class is Coverage or a subclass. The parameter name of source coverages can be anything, but the Java Advanced Imaging usage is "source0" for the first source, "source1" for the second source (if any), etc.

AbstractOperation is the base class offering few convenience for the developers, but few restrictions on the kind of source coverage and on the way to implement the operation. AbstractOperation can be pure mathematical functions.

Operation2D is a subclass expecting source coverages that are specifically of type GridCoverage2D or a subclass. GridCoverage2D has a mechanism for storing its data in a packed form, typically as 8 or 16 bits integers convertible to geophysics values by a linear equation. Because most operations need to be applied on geophysics values in order to produce correct results, Operation2D provides facilities for converting the source coverages to their geophysics view, and converting the result back to the original (packed or not) view.

OperationJAI is a subclass expecting the coverage operation to be implemented as a Java Advanced Imaging (JAI) operation working on RenderedImage. Because GridCoverage2D are basically wrappers around RenderedImage, it is often good design to implement the coverage operation as a wrapper around the corresponding JAI operation. However such wrapper needs to perform some pre-processing and post-processing tasks that are relative to the geographic nature of the operation. For example calculating the sum of sample values of two images usually requires that those images are first projected in the same Coordinate Reference System (CRS). The OperationJAI class is designed for handling those common pre- and post-processing.

Martin Desruisseaux (IRD, Geomatys)

Defined in the geotk-coverage module

Skip navigation links

Copyright © 2009–2017 All rights reserved.