public class Mosaic extends OperationJAI
GridCoverage2D
s. The GridCoverage2D
s can
have different resolutions; the operation will resample them to the same one. The policies for
choosing the output resolution are:
GridCoverage2D
s are in the same CRS, else
an exception is thrown.
The input parameters of the operation are:
GridCoverage2D
to mosaic
GridGeometry
object for setting the final resolution and BoundingBox
String
indicating the policy to use for choosing the resolution
double[]
indicating the nodata values to set for the background. Note
that the only the first value will be used
Modifier and Type | Class and Description |
---|---|
static class |
Mosaic.GridGeometryPolicy
Enum used for choosing the output
GridGeometry2D to use and then resampling all the
GridCoverage2D to its resolution. |
protected static class |
Mosaic.Params
A block of parameters for a
GridCoverage2D processed by the Mosaic operation. |
OperationJAI.Parameters
Modifier and Type | Field and Description |
---|---|
static ParameterDescriptor<Collection> |
ALPHA
The parameter descriptor for the Alpha band.
|
static String |
ALPHA_NAME
Name for the input Alpha bands
|
static String |
GEOMETRY
Name for the GG2D parameter
|
static ParameterDescriptor<String> |
GEOMETRY_POLICY
The parameter descriptor for the GridGeometry choosing policy.
|
static ParameterDescriptor<GridGeometry> |
GG
The parameter descriptor for the GridGeometry to use.
|
static String |
OUTNODATA_NAME
Name for the Output No Data parameter
|
static ParameterDescriptor<double[]> |
OUTPUT_NODATA
The parameter descriptor for the Transformation Choice.
|
static String |
POLICY
Name for the COVERAGE_INDEX parameter
|
static ParameterDescriptor |
SOURCES
The parameter descriptor for the Sources.
|
static String |
SOURCES_NAME
Name for the Sources parameter
|
operation, RENDERED_MODE
PRIMARY_SOURCE_INDEX, SOURCE_0
descriptor
Constructor and Description |
---|
Mosaic() |
Modifier and Type | Method and Description |
---|---|
protected RenderedImage |
createRenderedImage(ParameterBlockJAI parameters,
RenderingHints hints)
We override this one to get some extra behavior that ImageWorker has (ROI, paletted images
management)
|
Coverage |
doOperation(ParameterValueGroup parameters,
Hints hints)
Applies a process operation to a grid coverage.
|
protected void |
extractSources(ParameterValueGroup parameters,
Collection<GridCoverage2D> sources,
String[] sourceNames)
Extraction of the sources from the parameter called SOURCES.
|
protected Map<String,?> |
getProperties(RenderedImage data,
CoordinateReferenceSystem crs,
InternationalString name,
MathTransform gridToCRS,
GridCoverage2D[] sources,
Mosaic.Params parameters) |
deriveCategory, deriveGridCoverage, deriveName, deriveRange, deriveSampleDimension, deriveUnit, equals, getJAI, getOperationDescriptor, getProperties, getQuantitative, handleJAIEXTParams, handleROINoDataInternal, handleROINoDataProperties, hashCode, prepareParameters, resampleToCommonGeometry
extractSources, getFactory
getDescription, getDocURL, getName, getNumSources, getParameters, getVendor, getVersion, toString
public static final String POLICY
public static final String GEOMETRY
public static final String SOURCES_NAME
public static final String OUTNODATA_NAME
public static final String ALPHA_NAME
public static final ParameterDescriptor SOURCES
public static final ParameterDescriptor<GridGeometry> GG
public static final ParameterDescriptor<String> GEOMETRY_POLICY
public static final ParameterDescriptor<double[]> OUTPUT_NODATA
public static final ParameterDescriptor<Collection> ALPHA
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 RenderedImage createRenderedImage(ParameterBlockJAI parameters, RenderingHints hints)
createRenderedImage
in class OperationJAI
parameters
- The parameters to be given to JAI.hints
- The rendering hints to be given to JAI.protected Map<String,?> getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform gridToCRS, GridCoverage2D[] sources, Mosaic.Params parameters)
protected void extractSources(ParameterValueGroup parameters, Collection<GridCoverage2D> sources, String[] sourceNames) throws ParameterNotFoundException, InvalidParameterValueException
OperationJAI
extractSources
in class OperationJAI
ParameterNotFoundException
InvalidParameterValueException
Copyright © 1996–2019 Geotools. All rights reserved.