| |
|
| java.lang.Object org.geotools.coverage.processing.AbstractProcessor org.geotools.coverage.processing.DefaultProcessor
DefaultProcessor | public class DefaultProcessor extends AbstractProcessor (Code) | | Default implementation of a
processor.
This default implementation makes the following assumptions:
- Operations are declared in the
META-INF/services/org.opengis.coverage.processing.Operation file.
- Operations are actually instances of
AbstractOperation (note: this constraint
may be relaxed in a future version after GeoAPI interfaces for grid coverage will be
redesigned).
- Most operations are backed by Java Advanced Imaging.
Note: This implementation do not caches produced coverages. Since coverages
may be big, consider wrapping
DefaultProcessor instances in
BufferedProcessor .
since: 2.2 version: $Id: DefaultProcessor.java 22482 2006-10-31 02:58:00Z desruisseaux $ author: Martin Desruisseaux |
Method Summary | |
protected synchronized void | addOperation(Operation operation) Add the specified operation to this processor. | public synchronized Coverage | doOperation(ParameterValueGroup parameters) Applies a process operation to a coverage. | public synchronized Operation | getOperation(String name) Returns the operation for the specified name.
Parameters: name - Name of the operation (case insensitive). | public synchronized Collection | getOperations() Retrieves grid processing operations information. | final public Object | getRenderingHint(RenderingHints.Key key) Returns a rendering hint.
Parameters: key - The hint key (e.g. | public synchronized void | scanForPlugins() Scans for factory plug-ins on the application class path. | void | setAsDefault() Removes the GRID_COVERAGE_PROCESSOR hint. | final void | setProcessor(AbstractProcessor processor) Sets the GRID_COVERAGE_PROCESSOR hint to the specified value. |
DefaultProcessor | public DefaultProcessor(RenderingHints hints)(Code) | | Constructs a default coverage processor. The
DefaultProcessor.scanForPlugins method will be
automatically invoked the first time an operation is required. Additional operations
can be added by subclasses with the
DefaultProcessor.addOperation method. Rendering hints will
be initialized with the following hints:
Parameters: hints - A set of additional rendering hints, or null if none. |
addOperation | protected synchronized void addOperation(Operation operation) throws IllegalStateException(Code) | | Add the specified operation to this processor. This method is usually invoked
at construction time before this processor is made accessible.
Parameters: operation - The operation to add. throws: IllegalStateException - if an operation already exists with the same name. |
doOperation | public synchronized Coverage doOperation(ParameterValueGroup parameters) throws OperationNotFoundException(Code) | | Applies a process operation to a coverage. The default implementation checks if source
coverages use an interpolation, and then invokes
AbstractOperation.doOperation .
If all source coverages used the same interpolation, then this interpolation is applied
to the resulting coverage (except if the resulting coverage has already an interpolation).
Parameters: parameters - Parameters required for the operation. The easiest way to construct themis to invoke operation.Operation.getParameters getParameters() and to modify the returned group. The result as a coverage. throws: OperationNotFoundException - if there is no operation for the parameter group name. |
getOperation | public synchronized Operation getOperation(String name) throws OperationNotFoundException(Code) | | Returns the operation for the specified name.
Parameters: name - Name of the operation (case insensitive). The operation for the given name. throws: OperationNotFoundException - if there is no operation for the specified name. |
getOperations | public synchronized Collection getOperations()(Code) | | Retrieves grid processing operations information. Each operation information contains
the name of the operation as well as a list of its parameters.
|
getRenderingHint | final public Object getRenderingHint(RenderingHints.Key key)(Code) | | Returns a rendering hint.
Parameters: key - The hint key (e.g. Hints.JAI_INSTANCE). The hint value for the specified key, or null if there is no hint for thespecified key. |
scanForPlugins | public synchronized void scanForPlugins()(Code) | | Scans for factory plug-ins on the application class path. This method is needed because the
application class path can theoretically change, or additional plug-ins may become available.
Rather than re-scanning the classpath on every invocation of the API, the class path is
scanned automatically only on the first invocation. Clients can call this method to prompt
a re-scan. Thus this method need only be invoked by sophisticated applications which
dynamically make new plug-ins available at runtime.
|
setAsDefault | void setAsDefault()(Code) | | Removes the GRID_COVERAGE_PROCESSOR hint. The
AbstractOperation.getProcessor method
will automatically returns the default instance when this hint is not defined. Removing this
hint provides three advantages for the common case when the default processor is used:
- Avoid a strong reference to this processor in
RenderedImage properties.
- Avoid serialization of this processor when a
RenderedImage is serialized.
- Allows
AbstractOperation.getProcessor to returns the
BufferedProcessor instance instead of this instance.
|
|
|
|