public class Resample extends Operation2D
Geotools extension:
The "Resample" operation use the default CoordinateOperationFactory for creating a transformation from
the source to the destination coordinate reference systems. If a custom factory is desired, it
may be supplied as a rendering hint with the Hints.COORDINATE_OPERATION_FACTORY key. Rendering hints can be
supplied to org.geotools.coverage.processing.DefaultProcessor at construction time.
Name: "Resample"
JAI operator: "Affine" or
"Warp"
Parameters:
| Name | Class | Default value | Minimum value | Maximum value |
|---|---|---|---|---|
"Source" |
GridCoverage2D |
N/A | N/A | N/A |
"InterpolationType" |
CharSequence |
"NearestNeighbor" | N/A | N/A |
"CoordinateReferenceSystem" |
CoordinateReferenceSystem |
Same as source grid coverage | N/A | N/A |
"GridGeometry" |
GridGeometry |
(automatic) | N/A | N/A |
"BackgroundValues" |
double[] |
N/A | N/A | N/A |
Operations.resample(org.opengis.coverage.Coverage, org.opengis.referencing.crs.CoordinateReferenceSystem),
WarpDescriptor,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static ParameterDescriptor<double[]> |
BACKGROUND_VALUES
The parameter descriptor for the BackgroundValues.
|
static ParameterDescriptor<CoordinateReferenceSystem> |
COORDINATE_REFERENCE_SYSTEM
The parameter descriptor for the coordinate reference system.
|
static String |
GRID_DIMENSIONS
Key for the warp grid dimensions, available only if a WarpGrid is being used.
|
static ParameterDescriptor<GridGeometry> |
GRID_GEOMETRY
The parameter descriptor for the grid geometry.
|
static ParameterDescriptor<Object> |
INTERPOLATION_TYPE
The parameter descriptor for the interpolation type.
|
static String |
OPERATION
Key for the reprojection operation being used (null if no operation is performed)
|
static String |
WARP_TYPE
Key for the warp operation
Class, null otherwise |
PRIMARY_SOURCE_INDEX, SOURCE_0descriptor| Constructor and Description |
|---|
Resample()
Constructs a
"Resample" operation. |
| Modifier and Type | Method and Description |
|---|---|
static GridGeometry |
computeGridGeometry(GridCoverage source,
Envelope target)
Computes a grid geometry from a source coverage and a target envelope.
|
Coverage |
doOperation(ParameterValueGroup parameters,
Hints hints)
Resamples a grid coverage.
|
extractSources, getFactoryequals, getDescription, getDocURL, getName, getNumSources, getParameters, getVendor, getVersion, hashCode, toStringpublic static final ParameterDescriptor<Object> INTERPOLATION_TYPE
public static final ParameterDescriptor<CoordinateReferenceSystem> COORDINATE_REFERENCE_SYSTEM
public static final ParameterDescriptor<GridGeometry> GRID_GEOMETRY
public static final ParameterDescriptor<double[]> BACKGROUND_VALUES
public static final String OPERATION
public static final String WARP_TYPE
Class, null otherwisepublic static final String GRID_DIMENSIONS
Dimension objectpublic Coverage doOperation(ParameterValueGroup parameters, Hints hints)
org.geotools.coverage.processing.DefaultProcessor for the "Resample" operation.doOperation in class AbstractOperationparameters - List of name value pairs for the parameters required for the operation.hints - A set of rendering hints, or null if none. The DefaultProcessor
may provides hints for the following keys: Hints.COORDINATE_OPERATION_FACTORY and
Hints.JAI_INSTANCE.public static GridGeometry computeGridGeometry(GridCoverage source, Envelope target) throws TransformException
GRID_GEOMETRY argument of a "resample" operation
from an envelope. The target envelope may contains a different coordinate reference system,
in which case a reprojection will be performed.source - The source coverage.target - The target envelope, including a possibly different coordinate reference
system.TransformException - If a transformation was required and failed.Copyright © 1996–2019 Geotools. All rights reserved.