org.geotools.coverage.grid
Class Calculator2D

Object
  extended by PropertySourceImpl
      extended by AbstractCoverage
          extended by AbstractGridCoverage
              extended by GridCoverage2D
                  extended by Calculator2D
All Implemented Interfaces:
Serializable, PropertySource, RenderedCoverage, Coverage, GridCoverage
Direct Known Subclasses:
Interpolator2D

public abstract class Calculator2D
extends GridCoverage2D

A grid coverage backed by the same image, grid geometry and sample dimension than an other coverage, but performing some additional calculation in its evaluate methods.

Since:
2.5
Author:
Martin Desruisseaux (IRD)
See Also:
Serialized Form
Module:
modules/library/coverage (gt-coverage.jar)

Nested Class Summary
 
Nested classes/interfaces inherited from class GridCoverage2D
GridCoverage2D.Renderable
 
Field Summary
protected  GridCoverage2D source
          The source grid coverage which was specified at construction time (never null).
 
Fields inherited from class GridCoverage2D
gridGeometry, image
 
Fields inherited from class AbstractGridCoverage
LOGGER
 
Fields inherited from class AbstractCoverage
crs
 
Fields inherited from class PropertySourceImpl
cachedPropertyNames, properties, propertySources
 
Constructor Summary
protected Calculator2D(CharSequence name, GridCoverage2D coverage)
          Constructs a new grid coverage with the same parameter than the specified coverage.
 
Method Summary
protected abstract  GridCoverage2D specialize(GridCoverage2D view)
          Invoked by view(type) when the packed, geophysics or photographic view of this grid coverage needs to be created.
 
Methods inherited from class GridCoverage2D
dispose, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, evaluate, geophysics, getCoordinateReferenceSystem2D, getDebugString, getEnvelope, getEnvelope2D, getGridGeometry, getInterpolation, getNumSampleDimensions, getOptimalDataBlockSizes, getRenderableImage, getRenderedImage, getSampleDimension, getSampleDimensions, getViewTypes, isDataEditable, prefetch, show, show, toString, view
 
Methods inherited from class AbstractGridCoverage
formatEvaluateError, formatEvaluateError, getDataBlock, getDataBlock, getDataBlock, getDataBlock, getDataBlock, getDataBlock, getGridPacking, getNumOverviews, getOverview, getOverviewGridGeometry, getPackedDataBlock, getSources, setDataBlock, setDataBlock, setDataBlock, setDataBlock, setDataBlock, setDataBlock, setPackedDataBlock
 
Methods inherited from class AbstractCoverage
evaluate, evaluate, evaluateInverse, find, find, getCommonPointRule, getCoordinateReferenceSystem, getDimension, getDomainElements, getDomainExtents, getLocale, getName, getRangeElements, getRangeType, list, select, show
 
Methods inherited from class PropertySourceImpl
getProperties, getProperty, getPropertyClass, getPropertyNames, getPropertyNames
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface GridCoverage
getDataBlock, getDataBlock, getDataBlock, getDataBlock, getDataBlock, getDataBlock, getGridPacking, getNumOverviews, getOverview, getOverviewGridGeometry, getPackedDataBlock, getSources, setDataBlock, setDataBlock, setDataBlock, setDataBlock, setDataBlock, setDataBlock
 
Methods inherited from interface Coverage
evaluate, evaluate, evaluateInverse, find, find, getCommonPointRule, getCoordinateReferenceSystem, getDomainElements, getDomainExtents, getRangeElements, getRangeType, list, select
 
Methods inherited from interface PropertySource
getProperty, getPropertyClass, getPropertyNames, getPropertyNames
 

Field Detail

source

protected final GridCoverage2D source
The source grid coverage which was specified at construction time (never null).

Constructor Detail

Calculator2D

protected Calculator2D(CharSequence name,
                       GridCoverage2D coverage)
Constructs a new grid coverage with the same parameter than the specified coverage.

Parameters:
name - The name for this coverage, or null for the same than coverage.
coverage - The source grid coverage.
Method Detail

specialize

protected abstract GridCoverage2D specialize(GridCoverage2D view)
Invoked by view(type) when the packed, geophysics or photographic view of this grid coverage needs to be created. The view method first gets the desired view from the source coverage, then passes it as the argument to this method. Subclasses should define this method as below:
return new MyCalculator2D(view, <any configuration to copy>);

Parameters:
view - A view derived from the source coverage.
Returns:
The grid coverage to be returned by view, typically of the same class than this (but this is not a strong requirement).


Copyright © 1996-2009 Geotools. All Rights Reserved.