public class BandMerge extends OperationJAI
OperationJAI subclass used for executing the "Merge" of multiple coverages into a single
coverage with multiple bands. This operation can be used also for merging coverages which are not
aligned and with different resolutions. The user should only set: *
| Modifier and Type | Class and Description |
|---|---|
static class |
BandMerge.TransformList
Enum used for selecting an Affine Transformation to use for backward mapping the final
coverage pixel to the Model Space.
|
OperationJAI.Parameters| Modifier and Type | Field and Description |
|---|---|
static String |
COVERAGE_INDEX
Name for the COVERAGE_INDEX parameter
|
static String |
GEOMETRY
Name for the GEOMETRY parameter
|
static ParameterDescriptor |
GEOMETRY_PARAM
The parameter descriptor for the Transformation Choice.
|
static ParameterDescriptor |
INDEX
The parameter descriptor for the Source index to use for selecting the Affine Transformation
to use.
|
static ParameterDescriptor |
SOURCES
The parameter descriptor for the Sources.
|
static String |
TRANSFORM_CHOICE
Name for the TRANSFORM_CHOICE parameter
|
static ParameterDescriptor |
TRANSFORM_CHOICE_PARAM
The parameter descriptor for the Transformation Choice.
|
operation, RENDERED_MODEPRIMARY_SOURCE_INDEX, SOURCE_0descriptor| Constructor and Description |
|---|
BandMerge() |
| Modifier and Type | Method and Description |
|---|---|
protected GridSampleDimension[] |
deriveSampleDimension(GridSampleDimension[][] list,
OperationJAI.Parameters parameters)
Returns the sample dimensions for the target grid coverage.
|
Coverage |
doOperation(ParameterValueGroup parameters,
Hints hints)
Applies a process operation to a grid coverage.
|
protected void |
extractSources(ParameterValueGroup parameters,
Collection<GridCoverage2D> sources)
Extraction of the sources from the parameter called SOURCES.
|
protected Map |
getProperties(RenderedImage data,
CoordinateReferenceSystem crs,
InternationalString name,
MathTransform toCRS,
GridCoverage2D[] sources,
BandMerge.BandMergeParams parameters) |
createRenderedImage, deriveCategory, deriveGridCoverage, deriveName, deriveRange, deriveUnit, equals, extractSources, getJAI, getOperationDescriptor, getProperties, getQuantitative, handleJAIEXTParams, handleROINoDataInternal, handleROINoDataProperties, hashCode, prepareParameters, resampleToCommonGeometryextractSources, getFactorygetDescription, getDocURL, getName, getNumSources, getParameters, getVendor, getVersion, toStringpublic static final String TRANSFORM_CHOICE
public static final String COVERAGE_INDEX
public static final String GEOMETRY
public static final ParameterDescriptor SOURCES
public static final ParameterDescriptor TRANSFORM_CHOICE_PARAM
public static final ParameterDescriptor INDEX
public static final ParameterDescriptor GEOMETRY_PARAM
public Coverage doOperation(ParameterValueGroup parameters, Hints hints) throws CoverageProcessingException
OperationJAIGridCoverage2Ds use the same coordinate reference
system (at least for the two-dimensional part) with the same gridToCRS relationship.
OperationJAI.deriveGridCoverage(org.geotools.coverage.grid.GridCoverage2D[], org.geotools.coverage.processing.OperationJAI.Parameters). The sources in the ParameterBlock are
RenderedImage objects obtained from GridCoverage2D.getRenderedImage().
GridCoverage2D.geophysics(false).
doOperation in class OperationJAIparameters - List of name value pairs for the parameters required for the operation.hints - A set of rendering hints, or null if none.CoverageProcessingException - if the operation can't be applied.OperationJAI.deriveGridCoverage(org.geotools.coverage.grid.GridCoverage2D[], org.geotools.coverage.processing.OperationJAI.Parameters)protected void extractSources(ParameterValueGroup parameters, Collection<GridCoverage2D> sources) throws ParameterNotFoundException, InvalidParameterValueException
parameters - sources - ParameterNotFoundExceptionInvalidParameterValueExceptionprotected Map getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, BandMerge.BandMergeParams parameters)
protected GridSampleDimension[] deriveSampleDimension(GridSampleDimension[][] list, OperationJAI.Parameters parameters)
OperationJAIderiveGridCoverage with a bandLists argument initialized as
below:
bandLists array length is equals to the number of source coverages.
bandLists[i] array length is equals to the number of sample
dimensions in the source coverage i.
bandLists[source][band].
This method shall returns an array with a length equals to the number of bands in the
target image. If the sample dimensions can't be determined, then this method is allowed to
returns null.
The default implementation iterates among all bands and invokes the deriveCategory and deriveUnit methods for each of them. Subclasses
should override this method if they know a more accurate algorithm for determining sample
dimensions.
deriveSampleDimension in class OperationJAIlist - The set of sample dimensions for each source GridCoverage2Ds.parameters - Parameters, rendering hints and coordinate reference system to use.null if
unknown.OperationJAI.deriveCategory(org.geotools.coverage.Category[], org.geotools.coverage.processing.OperationJAI.Parameters),
OperationJAI.deriveUnit(javax.measure.Unit<?>[], org.geotools.coverage.processing.OperationJAI.Parameters)Copyright © 1996–2019 Geotools. All rights reserved.