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 ImageN 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 Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class OperationJAI
operation, RENDERED_MODEFields inherited from class Operation2D
PRIMARY_SOURCE_INDEX, SOURCE_0Fields 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 GridCoverage2DderiveGridCoverage(GridCoverage2D[] sources, OperationJAI.Parameters parameters) Applies a ImageN 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, resampleToCommonGeometryMethods inherited from class Operation2D
extractSources, getFactoryMethods 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 theJAIoperation we wrap.- Throws:
OperationNotFoundException
-
BaseScaleOperationJAI
public BaseScaleOperationJAI(OperationDescriptor operation) Constructor forBaseScaleOperationJAI.- Parameters:
operation-OperationDescriptorof theJAIoperation we wrap.
-
BaseScaleOperationJAI
Constructor forBaseScaleOperationJAI.- Parameters:
operation-OperationDescriptorof theJAIoperation we wrap.
-
-
Method Details
-
deriveGridCoverage
protected GridCoverage2D deriveGridCoverage(GridCoverage2D[] sources, OperationJAI.Parameters parameters) Description copied from class:OperationJAIApplies a ImageN 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 ImageN operation using
OperationJAI.createRenderedImage(org.eclipse.imagen.ParameterBlockImageN, java.awt.RenderingHints). - Wraps the result in a
GridCoverage2Dobject.
- Overrides:
deriveGridCoveragein 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:
- Gets the sample dimensions for the target images by invoking the
-