Package org.apache.sis.coverage.grid
Class GridCoverageProcessor
Object
GridCoverageProcessor
- All Implemented Interfaces:
Cloneable
A predefined set of operations on grid coverages as convenience methods.
Thread-safety
GridCoverageProcessor
is safe for concurrent use in multi-threading environment.- Since:
- 1.1
- See Also:
Defined in the sis-feature
module
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ImageProcessor
The processor to use for operations on two-dimensional slices. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new processor with default configuration.GridCoverageProcessor
(ImageProcessor processor) Creates a new processor initialized to the given configuration. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a coverage processor with the same configuration than this processor.boolean
Returnstrue
if the given object is a coverage processor of the same class with the same configuration.Returns the interpolation method to use for resampling operations.Quantity<?>[]
Returns hints about the desired positional accuracy, in "real world" units or in pixel units.int
Returns a hash code value for this coverage processor based on its current configuration.resample
(GridCoverage source, GridGeometry target) Creates a new coverage with a different grid extent, resolution or coordinate reference system.void
setInterpolation
(Interpolation method) Sets the interpolation method to use for resampling operations.void
setPositionalAccuracyHints
(Quantity<?>... hints) Sets hints about desired positional accuracy, in "real world" units or in pixel units.
-
Field Details
-
imageProcessor
The processor to use for operations on two-dimensional slices.
-
-
Constructor Details
-
GridCoverageProcessor
public GridCoverageProcessor()Creates a new processor with default configuration. -
GridCoverageProcessor
Creates a new processor initialized to the given configuration.- Parameters:
processor
- the processor to use for operations on two-dimensional slices.
-
-
Method Details
-
getInterpolation
Returns the interpolation method to use for resampling operations. The default implementation delegates to the image processor.- Returns:
- interpolation method to use in resampling operations.
- See Also:
-
setInterpolation
Sets the interpolation method to use for resampling operations. The default implementation delegates to the image processor.- Parameters:
method
- interpolation method to use in resampling operations.- See Also:
-
getPositionalAccuracyHints
Returns hints about the desired positional accuracy, in "real world" units or in pixel units. The default implementation delegates to the image processor.- Returns:
- desired accuracy in no particular order, or an empty array if none.
- See Also:
-
setPositionalAccuracyHints
Sets hints about desired positional accuracy, in "real world" units or in pixel units. The default implementation delegates to the image processor.- Parameters:
hints
- desired accuracy in no particular order, or anull
array if none. Null elements in the array are ignored.- See Also:
-
resample
Creates a new coverage with a different grid extent, resolution or coordinate reference system. The desired properties are specified by theGridGeometry
argument, which may be incomplete. The missing grid geometry components are completed as below:Default values for undefined grid geometry components Component Default value Grid extent A default size preserving resolution at source point of interest. Grid to CRS transform Whatever it takes for fitting data inside the supplied extent. Coordinate reference system Same as source coverage. setInterpolation(Interpolation)
. If the grid coverage values are themselves interpolated, this method tries to use the original data. The intent is to avoid adding interpolations on top of other interpolations.- Parameters:
source
- the grid coverage to resample.target
- the desired geometry of returned grid coverage. May be incomplete.- Returns:
- a grid coverage with the characteristics specified in the given grid geometry.
- Throws:
IncompleteGridGeometryException
- if the source grid geometry is missing an information. It may be the source CRS, the source extent, etc. depending on context.TransformException
- if some coordinates can not be transformed to the specified target.
-
equals
Returnstrue
if the given object is a coverage processor of the same class with the same configuration. -
hashCode
public int hashCode()Returns a hash code value for this coverage processor based on its current configuration. -
clone
Returns a coverage processor with the same configuration than this processor.
-