Package org.geotools.coverage.processing
Class BaseScaleOperationJAI
Object
AbstractOperation
Operation2D
OperationJAI
BaseScaleOperationJAI
- All Implemented Interfaces:
Serializable
,Operation
- Direct Known Subclasses:
Affine
,FilteredSubsample
,Scale
,SubsampleAverage
,Warp
Base class for providing capabilities to scale
GridCoverage2D
objects using JAI scale operations.
This class tries to handles all the problems related to scaling index-color images in order to avoid strange results in the smoothest possible way by performing color expansions under the hood as needed. It may also apply some optimizations in case we were dealing with non-geo view of coverage.
- Since:
- 2.5
- Author:
- Simone Giannecchini, GeoSolutions.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class OperationJAI
OperationJAI.Parameters
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
Fields inherited from class OperationJAI
operation, RENDERED_MODE
Fields inherited from class Operation2D
PRIMARY_SOURCE_INDEX, SOURCE_0
Fields inherited from class AbstractOperation
descriptor
-
Constructor Summary
ConstructorsConstructorDescriptionBaseScaleOperationJAI
(String operation) Constructor forBaseScaleOperationJAI
.BaseScaleOperationJAI
(OperationDescriptor operation) Constructor forBaseScaleOperationJAI
.BaseScaleOperationJAI
(OperationDescriptor operation, ParameterDescriptorGroup descriptor) Constructor forBaseScaleOperationJAI
. -
Method Summary
Modifier and TypeMethodDescriptionprotected GridCoverage2D
deriveGridCoverage
(GridCoverage2D[] sources, OperationJAI.Parameters parameters) Applies a JAI operation to a grid coverage.Methods inherited from class OperationJAI
createRenderedImage, deriveCategory, deriveName, deriveRange, deriveSampleDimension, deriveUnit, doOperation, equals, extractSources, getJAI, getOperationDescriptor, getProperties, getQuantitative, handleJAIEXTParams, handleROINoDataInternal, handleROINoDataProperties, hashCode, prepareParameters, resampleToCommonGeometry
Methods inherited from class Operation2D
extractSources, getFactory
Methods inherited from class AbstractOperation
getDescription, getDocURL, getName, getNumSources, getParameters, getVendor, getVersion, toString
-
Field Details
-
AFFINE
- See Also:
-
SCALE
- See Also:
-
TRANSLATE
- See Also:
-
WARP
- See Also:
-
ROI
- See Also:
-
-
Constructor Details
-
BaseScaleOperationJAI
Constructor forBaseScaleOperationJAI
.- Parameters:
operation
- name of theJAI
operation we wrap.- Throws:
OperationNotFoundException
-
BaseScaleOperationJAI
public BaseScaleOperationJAI(OperationDescriptor operation) Constructor forBaseScaleOperationJAI
.- Parameters:
operation
-OperationDescriptor
of theJAI
operation we wrap.
-
BaseScaleOperationJAI
Constructor forBaseScaleOperationJAI
.- Parameters:
operation
-OperationDescriptor
of theJAI
operation we wrap.
-
-
Method Details
-
deriveGridCoverage
protected GridCoverage2D deriveGridCoverage(GridCoverage2D[] sources, OperationJAI.Parameters parameters) Description copied from class:OperationJAI
Applies a JAI operation to a grid coverage. This method is invoked automatically byOperationJAI.doOperation(org.geotools.api.parameter.ParameterValueGroup, org.geotools.util.factory.Hints)
. The default implementation performs the following steps:- Gets the sample dimensions for the target images by invoking the
deriveSampleDimension(...)
method. - Applied the JAI operation using
OperationJAI.createRenderedImage(javax.media.jai.ParameterBlockJAI, java.awt.RenderingHints)
. - Wraps the result in a
GridCoverage2D
object.
- Overrides:
deriveGridCoverage
in classOperationJAI
- Parameters:
sources
- The source coverages.parameters
- Parameters, rendering hints and coordinate reference system to use.- Returns:
- The result as a grid coverage.
- See Also:
-
OperationJAI.doOperation(org.geotools.api.parameter.ParameterValueGroup, org.geotools.util.factory.Hints)
OperationJAI.deriveSampleDimension(org.geotools.coverage.GridSampleDimension[][], org.geotools.coverage.processing.OperationJAI.Parameters)
JAI.createNS(java.lang.String, java.awt.image.renderable.ParameterBlock, java.awt.RenderingHints)
- Gets the sample dimensions for the target images by invoking the
-