org.geotools.gp
Class GridCoverageProcessor

java.lang.Object
  extended byorg.geotools.gp.GridCoverageProcessor

Deprecated. Replaced by DefaultProcessor.

public class GridCoverageProcessor
extends java.lang.Object

Allows for different ways of accessing the grid coverage values. Using one of these operations to change the way the grid is being accessed will not affect the state of the grid coverage controlled by another operations. For example, changing the interpolation method should not affect the number of sample dimensions currently being accessed or value sequence.

Version:
$Id: GridCoverageProcessor.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
OpenGIS, Martin Desruisseaux

Constructor Summary
protected GridCoverageProcessor()
          Deprecated. Construct a grid coverage processor with no operation and using the default JAI instance.
  GridCoverageProcessor(GridCoverageProcessor processor, java.awt.RenderingHints hints)
          Deprecated. Construct a grid coverage processor initialized with the same set of operations than the specified processor.
 
Method Summary
protected  void addOperation(Operation operation)
          Deprecated. Add the specified operation to this processor.
 GridCoverage doOperation(Operation operation, javax.media.jai.ParameterList parameters)
          Deprecated. Apply a process operation to a grid coverage.
 GridCoverage doOperation(java.lang.String operationName, GridCoverage source)
          Deprecated. Convenience method applying a process operation with default parameters.
 GridCoverage doOperation(java.lang.String operationName, GridCoverage source, java.lang.String argumentName1, java.lang.Object argumentValue1)
          Deprecated. Convenience method applying a process operation with one parameter.
 GridCoverage doOperation(java.lang.String operationName, GridCoverage source, java.lang.String argumentName1, java.lang.Object argumentValue1, java.lang.String argumentName2, java.lang.Object argumentValue2)
          Deprecated. Convenience method applying a process operation with two parameters.
 GridCoverage doOperation(java.lang.String operationName, GridCoverage source, java.lang.String argumentName1, java.lang.Object argumentValue1, java.lang.String argumentName2, java.lang.Object argumentValue2, java.lang.String argumentName3, java.lang.Object argumentValue3)
          Deprecated. Convenience method applying a process operation with three parameters.
 GridCoverage doOperation(java.lang.String operationName, javax.media.jai.ParameterList parameters)
          Deprecated. Apply a process operation to a grid coverage.
static GridCoverageProcessor getDefault()
          Deprecated. Returns the default grid coverage processor.
 Operation getOperation(java.lang.String name)
          Deprecated. Returns the operation for the specified name.
 Operation[] getOperations()
          Deprecated. Retrieve grid processing operation informations.
 java.lang.Object getRenderingHint(java.awt.RenderingHints.Key key)
          Deprecated. Returns a rendering hint.
static void main(java.lang.String[] args)
          Deprecated. Dumps to the standard output stream a list of operations for the default GridCoverageProcessor.
 void print(java.io.Writer out)
          Deprecated. Print a description of all operations to the specified stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridCoverageProcessor

protected GridCoverageProcessor()
Deprecated. 
Construct a grid coverage processor with no operation and using the default JAI instance. Operations can be added by invoking the addOperation(org.geotools.gp.Operation) method at construction time. Rendering hints will be initialized with the following hints:

Task:
REVISIT: This constror contains a hack for JAI 1.1.1 compatibility. This hack way be removed in a future version if we are going to require JAI 1.2.

GridCoverageProcessor

public GridCoverageProcessor(GridCoverageProcessor processor,
                             java.awt.RenderingHints hints)
Deprecated. 
Construct a grid coverage processor initialized with the same set of operations than the specified processor. The rendering hints are initialized to the union of the rendering hints of the specified processor, and the specified rendering hints. More operations can be added by invoking the addOperation(org.geotools.gp.Operation) method at construction time.

Parameters:
processor - The processor to inherit from, or null if none.
hints - A set of supplemental rendering hints, or null if none.
Method Detail

getDefault

public static GridCoverageProcessor getDefault()
Deprecated. 
Returns the default grid coverage processor.


getRenderingHint

public final java.lang.Object getRenderingHint(java.awt.RenderingHints.Key key)
Deprecated. 
Returns a rendering hint.

Parameters:
key - The hint key (e.g. Hints.JAI_INSTANCE).
Returns:
The hint value for the specified key, or null if there is no hint for the specified key.

addOperation

protected void addOperation(Operation operation)
                     throws java.lang.IllegalStateException
Deprecated. 
Add the specified operation to this processor. This method is usually invoked at construction time before this processor is made accessible. Once accessible, all GridCoverageProcessor instances should be immutable.

Parameters:
operation - The operation to add.
Throws:
java.lang.IllegalStateException - if an operation already exists with the same name than operation.

getOperations

public Operation[] getOperations()
Deprecated. 
Retrieve grid processing operation informations. The operation information will contain the name of the operation as well as a list of its parameters.


getOperation

public Operation getOperation(java.lang.String name)
                       throws OperationNotFoundException
Deprecated. 
Returns the operation for the specified name.

Parameters:
name - Name of the operation.
Returns:
The operation for the given name.
Throws:
OperationNotFoundException - if there is no operation for the specified name.

doOperation

public GridCoverage doOperation(java.lang.String operationName,
                                GridCoverage source)
                         throws OperationNotFoundException
Deprecated. 
Convenience method applying a process operation with default parameters.

Parameters:
operationName - Name of the operation to be applied to the grid coverage..
source - The source grid coverage.
Returns:
The result as a grid coverage.
Throws:
OperationNotFoundException - if there is no operation named operationName.
See Also:
doOperation(Operation,ParameterList)

doOperation

public GridCoverage doOperation(java.lang.String operationName,
                                GridCoverage source,
                                java.lang.String argumentName1,
                                java.lang.Object argumentValue1)
                         throws OperationNotFoundException,
                                java.lang.IllegalArgumentException
Deprecated. 
Convenience method applying a process operation with one parameter.

Parameters:
operationName - Name of the operation to be applied to the grid coverage..
source - The source grid coverage.
argumentName1 - The name of the first parameter to set.
argumentValue1 - The value for the first parameter.
Returns:
The result as a grid coverage.
Throws:
OperationNotFoundException - if there is no operation named operationName.
java.lang.IllegalArgumentException - if there is no parameter with the specified name.
See Also:
doOperation(Operation,ParameterList)

doOperation

public GridCoverage doOperation(java.lang.String operationName,
                                GridCoverage source,
                                java.lang.String argumentName1,
                                java.lang.Object argumentValue1,
                                java.lang.String argumentName2,
                                java.lang.Object argumentValue2)
                         throws OperationNotFoundException,
                                java.lang.IllegalArgumentException
Deprecated. 
Convenience method applying a process operation with two parameters.

Parameters:
operationName - Name of the operation to be applied to the grid coverage..
source - The source grid coverage.
argumentName1 - The name of the first parameter to set.
argumentValue1 - The value for the first parameter.
argumentName2 - The name of the second parameter to set.
argumentValue2 - The value for the second parameter.
Returns:
The result as a grid coverage.
Throws:
OperationNotFoundException - if there is no operation named operationName.
java.lang.IllegalArgumentException - if there is no parameter with the specified name.
See Also:
doOperation(Operation,ParameterList)

doOperation

public GridCoverage doOperation(java.lang.String operationName,
                                GridCoverage source,
                                java.lang.String argumentName1,
                                java.lang.Object argumentValue1,
                                java.lang.String argumentName2,
                                java.lang.Object argumentValue2,
                                java.lang.String argumentName3,
                                java.lang.Object argumentValue3)
                         throws OperationNotFoundException,
                                java.lang.IllegalArgumentException
Deprecated. 
Convenience method applying a process operation with three parameters.

Parameters:
operationName - Name of the operation to be applied to the grid coverage..
source - The source grid coverage.
argumentName1 - The name of the first parameter to set.
argumentValue1 - The value for the first parameter.
argumentName2 - The name of the second parameter to set.
argumentValue2 - The value for the second parameter.
argumentName3 - The name of the third parameter to set.
argumentValue3 - The value for the third parameter.
Returns:
The result as a grid coverage.
Throws:
OperationNotFoundException - if there is no operation named operationName.
java.lang.IllegalArgumentException - if there is no parameter with the specified name.
See Also:
doOperation(Operation,ParameterList)

doOperation

public GridCoverage doOperation(java.lang.String operationName,
                                javax.media.jai.ParameterList parameters)
                         throws OperationNotFoundException
Deprecated. 
Apply a process operation to a grid coverage.

Parameters:
operationName - Name of the operation to be applied to the grid coverage.
parameters - List of name value pairs for the parameters required for the operation. The easiest way to construct this list is to invoke getOperation(name).getParameterList() and to modify the returned list.
Returns:
The result as a grid coverage.
Throws:
OperationNotFoundException - if there is no operation named operationName.

doOperation

public GridCoverage doOperation(Operation operation,
                                javax.media.jai.ParameterList parameters)
Deprecated. 
Apply a process operation to a grid coverage. Default implementation checks if source coverages use an interpolation, and then invokes Operation.doOperation(javax.media.jai.ParameterList, java.awt.RenderingHints). If all source coverages used the same interpolation, the same interpolation is applied to the resulting coverage (except if the resulting coverage has already an interpolation).

Parameters:
operation - The operation to be applied to the grid coverage.
parameters - List of name value pairs for the parameters required for the operation. The easiest way to construct this list is to invoke operation.getParameterList() and to modify the returned list.
Returns:
The result as a grid coverage.

print

public void print(java.io.Writer out)
           throws java.io.IOException
Deprecated. 
Print a description of all operations to the specified stream. The description include operation names and lists of parameters.

Parameters:
out - The destination stream.
Throws:
java.io.IOException - if an error occured will writing to the stream.

main

public static void main(java.lang.String[] args)
Deprecated. 
Dumps to the standard output stream a list of operations for the default GridCoverageProcessor. This method can been invoked from the command line. For example:
 java org.geotools.gc.GridCoverageProcessor
 
Note for Windows users: If the output contains strange symbols, try to supply an "-encoding" argument. Example:
 java org.geotools.gc.GridCoverageProcessor -encoding Cp850
 
The codepage number (850 in the previous example) can be obtained from the DOS commande line by entering the "chcp" command with no arguments.



Copyright © GeoTools. All Rights Reserved.