org.geotools.coverage
Interface CoverageStack.Element

All Known Implementing Classes:
CoverageStack.Adapter
Enclosing interface:
CoverageStack

public static interface CoverageStack.Element

An element in a coverage stack. Each element is expected to extents over a range of z values (the new dimensions appended by the container). Implementations should be capable to returns coverage's range of z-values without loading the coverage's data. If an expensive loading is required, it should be delayed until the getCoverage(org.geotools.image.io.IIOListeners) method is invoked. If is invoked more than once, caching (if desirable) is implementor's responsability.

All methods declares IOException in their throws cause in case I/O operations are required. Subclasses of include IIOException for image I/O operations, or java.rmi.RemoteOperation for remote method invocation (which may be useful for large images database backed by a distant server).

Since:
2.1
Version:
$Id: CoverageStack.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux

Method Summary
 org.opengis.coverage.Coverage getCoverage(IIOListeners listeners)
          Returns the coverage, loading the data if needed.
 org.opengis.spatialschema.geometry.Envelope getEnvelope()
          Returns the coverage envelope, or if this information is too expensive to compute.
 org.opengis.coverage.grid.GridGeometry getGridGeometry()
          The coverage grid geometry, or if this information do not applies or is too expensive to compute.
 java.lang.String getName()
          Returns a name for the coverage.
 org.opengis.coverage.SampleDimension[] getSampleDimensions()
          The sample dimension for the coverage, or if this information is too expensive to compute.
 NumberRange getZRange()
          Returns the minimum and maximum z value for the coverage.
 

Method Detail

getName

public java.lang.String getName()
                         throws java.io.IOException
Returns a name for the coverage. This method should not load a large amount of data, since it may be invoked soon. This method is invoked just before getCoverage(org.geotools.image.io.IIOListeners) in order to log a "Loading data..." message.

Throws:
java.io.IOException

getZRange

public NumberRange getZRange()
                      throws java.io.IOException
Returns the minimum and maximum z value for the coverage. This information is mandatory. This method should not load a large amount of data, since it may be invoked soon. Note that this method may be invoked often, so it should be efficient.

Throws:
java.io.IOException - if an I/O operation was required but failed.

getEnvelope

public org.opengis.spatialschema.geometry.Envelope getEnvelope()
                                                        throws java.io.IOException
Returns the coverage envelope, or if this information is too expensive to compute. The envelope may or may not contains an extra dimension for the range of z values, since the CoverageStack class is tolerant in this regard. This method should not load a large amount of data, since it may be invoked soon.

Throws:
java.io.IOException - if an I/O operation was required but failed.

getGridGeometry

public org.opengis.coverage.grid.GridGeometry getGridGeometry()
                                                       throws java.io.IOException
The coverage grid geometry, or if this information do not applies or is too expensive to compute. This method should not load a large amount of data, since it may be invoked soon.

Throws:
java.io.IOException - if an I/O operation was required but failed.

getSampleDimensions

public org.opengis.coverage.SampleDimension[] getSampleDimensions()
                                                           throws java.io.IOException
The sample dimension for the coverage, or if this information is too expensive to compute. This method should not load a large amount of data, since it may be invoked soon.

Throws:
java.io.IOException - if an I/O operation was required but failed.

getCoverage

public org.opengis.coverage.Coverage getCoverage(IIOListeners listeners)
                                          throws java.io.IOException
Returns the coverage, loading the data if needed. Implementations should invokes the IIOListeners.addListenersTo(ImageReader) method if they use an image reader for loading data. Caching (if desired) is implementor's responsability. The default CoverageStack implementation caches only the last coverage used.

Parameters:
listeners - Listeners to register to the image I/O reader, if such a reader is going to be used.
Throws:
java.io.IOException - if a data loading was required but failed.


Copyright © GeoTools. All Rights Reserved.