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> |
GEOMETRY_PARAM
The parameter descriptor for the Transformation Choice.
|
static ParameterDescriptor<Integer> |
INDEX
The parameter descriptor for the Source index to use for selecting the Affine Transformation
to use.
|
static ParameterDescriptor<Collection> |
SOURCES
The parameter descriptor for the Sources.
|
static String |
TRANSFORM_CHOICE
Name for the TRANSFORM_CHOICE parameter
|
static ParameterDescriptor<String> |
TRANSFORM_CHOICE_PARAM
The parameter descriptor for the Transformation Choice.
|
operation, RENDERED_MODE
PRIMARY_SOURCE_INDEX, SOURCE_0
descriptor
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, resampleToCommonGeometry
extractSources, getFactory
getDescription, getDocURL, getName, getNumSources, getParameters, getVendor, getVersion, toString
public static final String TRANSFORM_CHOICE
public static final String COVERAGE_INDEX
public static final String GEOMETRY
public static final ParameterDescriptor<Collection> SOURCES
public static final ParameterDescriptor<String> TRANSFORM_CHOICE_PARAM
public static final ParameterDescriptor<Integer> INDEX
public static final ParameterDescriptor<Geometry> GEOMETRY_PARAM
public Coverage doOperation(ParameterValueGroup parameters, Hints hints) throws CoverageProcessingException
OperationJAI
GridCoverage2D
s 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 OperationJAI
parameters
- 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
protected Map getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, BandMerge.BandMergeParams parameters)
protected GridSampleDimension[] deriveSampleDimension(GridSampleDimension[][] list, OperationJAI.Parameters parameters)
OperationJAI
deriveGridCoverage
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 OperationJAI
list
- The set of sample dimensions for each source GridCoverage2D
s.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–2023 Geotools. All rights reserved.