org.geotools.coverage.processing
Class BaseScaleOperationJAI

Object
  extended by AbstractOperation
      extended by Operation2D
          extended by OperationJAI
              extended by BaseScaleOperationJAI
All Implemented Interfaces:
Serializable, Operation
Direct Known Subclasses:
FilteredSubsample, Scale, SubsampleAverage

public class BaseScaleOperationJAI
extends OperationJAI

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:
Serialized Form
Module:

Nested Class Summary
 
Nested classes/interfaces inherited from class OperationJAI
OperationJAI.Parameters
 
Field Summary
 
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
BaseScaleOperationJAI(OperationDescriptor operation)
          Constructor for BaseScaleOperationJAI.
BaseScaleOperationJAI(OperationDescriptor operation, ParameterDescriptorGroup descriptor)
          Constructor for BaseScaleOperationJAI.
BaseScaleOperationJAI(String operation)
          Constructor for BaseScaleOperationJAI.
 
Method Summary
protected  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, getJAI, getOperationDescriptor, getProperties, getQuantitative, prepareParameters, resampleToCommonGeometry
 
Methods inherited from class Operation2D
computeOnGeophysicsValues, extractSources, getFactory
 
Methods inherited from class AbstractOperation
ensureNonNull, getDescription, getDocURL, getName, getNumSources, getParameters, getProcessor, getVendor, getVersion, hashCode, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseScaleOperationJAI

public BaseScaleOperationJAI(String operation)
                      throws OperationNotFoundException
Constructor for BaseScaleOperationJAI.

Parameters:
operation - name of the JAI operation we wrap.
Throws:
OperationNotFoundException

BaseScaleOperationJAI

public BaseScaleOperationJAI(OperationDescriptor operation)
Constructor for BaseScaleOperationJAI.

Parameters:
operation - OperationDescriptor of the JAI operation we wrap.

BaseScaleOperationJAI

public BaseScaleOperationJAI(OperationDescriptor operation,
                             ParameterDescriptorGroup descriptor)
Constructor for BaseScaleOperationJAI.

Parameters:
operation - OperationDescriptor of the JAI operation we wrap.
descriptor -
Method Detail

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 by OperationJAI.doOperation(org.opengis.parameter.ParameterValueGroup, org.geotools.factory.Hints). The default implementation performs the following steps:

Overrides:
deriveGridCoverage in class OperationJAI
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.opengis.parameter.ParameterValueGroup, org.geotools.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)


Copyright © 1996-2009 Geotools. All Rights Reserved.