org.geotools.coverage.processing
Class FilterOperation

java.lang.Object
  extended byorg.geotools.coverage.processing.AbstractOperation
      extended byorg.geotools.coverage.processing.Operation2D
          extended byorg.geotools.coverage.processing.OperationJAI
              extended byorg.geotools.coverage.processing.FilterOperation
All Implemented Interfaces:
org.opengis.coverage.processing.Operation, java.io.Serializable
Direct Known Subclasses:
NodataFilter

public class FilterOperation
extends OperationJAI

Common super-class for filter operation. The following is adapted from OpenGIS specification:

Filtering is an enhancement operation that alters the grid values on the basis of the neighborhood grid values. For this reason, filtering is considered to be a spatial or area opeartion. There are many different filters that can be applied to a grid coverage but the general concept of filtering is the same. A filter window or kernel is defined, its dimension being an odd number in the x and y dimensions. Each cell in this window contains a co-efficient or weighting factor representative of some mathmetical relationship. A filtered grid coverage is generated by multipling each coefficient in the window by the grid value in the original grid coverage corresponding to the window?s current location and assigning the result to the central pixel location of the window in the filtered grid coverage. The window is moved thoughout the grid coverage on pixel at a time. This window multiplication process is known as convolution. A grid coverage contains both low and high spatial information. High frequencies describe rapid change from one grid cell to another such as roads or other boundary conditions. Low frequencies describe gradual change over a large number of cells such as water bodies. High pass filters allow only high frequency information to be generated in the new grid coverage Grid coverages generated with high pass filters will show edge conditions. Low pass filters allow low frequency information to be generated in the new grid coverage. The grid coverage produced from a filtering operation will have the same dimension as the source grid coverage. To produce filtered values around the edges of the source grid coverage, edge rows and columns will be duplicated to fill a complete kernel.

Since:
2.2
Version:
$Id: FilterOperation.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.geotools.coverage.processing.OperationJAI
OperationJAI.Parameters
 
Field Summary
 
Fields inherited from class org.geotools.coverage.processing.OperationJAI
operation
 
Fields inherited from class org.geotools.coverage.processing.Operation2D
SOURCE_0
 
Fields inherited from class org.geotools.coverage.processing.AbstractOperation
descriptor
 
Constructor Summary
FilterOperation(java.lang.String name)
          Constructs a new filter operation.
 
Method Summary
protected  GridSampleDimension[] deriveSampleDimension(GridSampleDimension[][] bandLists, OperationJAI.Parameters parameters)
          Returns the target sample dimensions.
 
Methods inherited from class org.geotools.coverage.processing.OperationJAI
computeOnGeophysicsValues, createRenderedImage, deriveCategory, deriveGridCoverage, deriveName, deriveRange, deriveUnit, doOperation, equals, getJAI, resampleToCommonGeometry
 
Methods inherited from class org.geotools.coverage.processing.Operation2D
getFactory, getGridCoverageProcessor
 
Methods inherited from class org.geotools.coverage.processing.AbstractOperation
ensureNonNull, getDescription, getDocURL, getName, getNumSources, getParameters, getProcessor, getVendor, getVersion, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterOperation

public FilterOperation(java.lang.String name)
                throws org.opengis.coverage.processing.OperationNotFoundException
Constructs a new filter operation.

Parameters:
name - The JAI operation name.
Throws:
org.opengis.coverage.processing.OperationNotFoundException - if no JAI descriptor was found for the given name.
Method Detail

deriveSampleDimension

protected GridSampleDimension[] deriveSampleDimension(GridSampleDimension[][] bandLists,
                                                      OperationJAI.Parameters parameters)
Returns the target sample dimensions. Since filter operation do not change the range of values, this method returns the same sample dimension than the first source.

Overrides:
deriveSampleDimension in class OperationJAI
Parameters:
bandLists - The set of sample dimensions for each source GridCoverage2Ds.
parameters - Parameters, rendering hints and coordinate reference system to use.
Returns:
The sample dimensions for each band in the destination image, or if unknow.
See Also:
OperationJAI.deriveCategory(org.geotools.coverage.Category[], org.geotools.coverage.processing.OperationJAI.Parameters), OperationJAI.deriveUnit(javax.units.Unit[], org.geotools.coverage.processing.OperationJAI.Parameters)


Copyright © GeoTools. All Rights Reserved.