deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.model.coverage
Interface Coverage

All Known Subinterfaces:
GridCoverage
All Known Implementing Classes:
AbstractCoverage, AbstractGridCoverage, ByteGridCoverage, FloatGridCoverage, ImageGridCoverage, ShortGridCoverage

public interface Coverage

Provides access to a coverage. The essential property of coverage is to be able to generate a value for any point within its domain. How coverage is represented internally is not a concern. For example consider the following different internal representations of coverage:

A coverage has a corresponding SampleDimension for each sample dimension in the coverage.

Implementation note:
We expect that many implementations of "org.opengis.coverage.grid.GridCoverage" will want to leverage the rich set of Java Advanced Imaging (JAI) features. For those implementations, it is recommended (but not required) to implement the PropertySource interface as well. In this case, implementation of PropertySource methods must be consistent with getMetadataNames() and getMetadataValue(java.lang.String) methods.

Version:
Grid Coverage specification 1.0, $Revision: 20326 $, $Date: 2009-10-22 18:41:56 +0200 (Do, 22 Okt 2009) $
Author:
OpenGIS® consortium, last edited by: $Author: mschneider $
See Also:
RenderableImage, ImageFunction

Method Summary
 CoordinateSystem getCoordinateReferenceSystem()
          Specifies the coordinate reference system used when accessing a coverage or grid coverage with the evaluate(...)
 java.lang.String[] getDimensionNames()
          The names of each dimension in the coverage.
 Envelope getEnvelope()
          The bounding box for the coverage domain in coordinate reference system coordinates.
 java.lang.String[] getMetadataNames()
          List of metadata keywords for a coverage.
 java.lang.String getMetadataValue(java.lang.String name)
          Retrieve the metadata value for a given metadata name.
 int getNumSampleDimensions()
          The number of sample dimensions in the coverage.
 int getNumSources()
          Number of grid coverages which the grid coverage was derived from.
 java.awt.image.renderable.RenderableImage getRenderableImage(int xAxis, int yAxis)
          Returns 2D view of this coverage as a renderable image.
 SampleDimension getSampleDimension(int index)
          Retrieve sample dimension information for the coverage.
 Coverage getSource(int sourceDataIndex)
          Returns the source data for a coverage.
 

Method Detail

getCoordinateReferenceSystem

CoordinateSystem getCoordinateReferenceSystem()
Specifies the coordinate reference system used when accessing a coverage or grid coverage with the evaluate(...) methods. It is also the coordinate reference system of the coordinates used with the math transform This coordinate reference system is usually different than coordinate system of the grid. Grid coverage can be accessed (re-projected) with new coordinate reference system with the "org.opengis.coverage.processing.GridCoverageProcessor" component. In this case, a new instance of a grid coverage is created.

Note: If a coverage does not have an associated coordinate reference system, the returned value will be null.

Returns:
The coordinate reference system used when accessing a coverage or grid coverage with the evaluate(...) methods, or null.

getEnvelope

Envelope getEnvelope()
The bounding box for the coverage domain in coordinate reference system coordinates. For grid coverages, the grid cells are centered on each grid coordinate. The envelope for a 2-D grid coverage includes the following corner positions.
  (Minimum row - 0.5, Minimum column - 0.5) for the minimum coordinates
  (Maximum row - 0.5, Maximum column - 0.5) for the maximum coordinates
 
If a grid coverage does not have any associated coordinate reference system, the minimum and maximum coordinate points for the envelope will be empty sequences.

Returns:
The bounding box for the coverage domain in coordinate system coordinates.

getDimensionNames

java.lang.String[] getDimensionNames()
The names of each dimension in the coverage. Typically these names are x, y, z and t. The number of items in the sequence is the number of dimensions in the coverage. Grid coverages are typically 2D (x, y) while other coverages may be 3D (x, y, z) or 4D (x, y, z, t). The number of dimensions of the coverage is the number of entries in the list of dimension names.

Returns:
The names of each dimension in the coverage.

getNumSampleDimensions

int getNumSampleDimensions()
The number of sample dimensions in the coverage. For grid coverages, a sample dimension is a band.

Returns:
The number of sample dimensions in the coverage.

getSampleDimension

SampleDimension getSampleDimension(int index)
                                   throws java.lang.IndexOutOfBoundsException
Retrieve sample dimension information for the coverage. For a grid coverage a sample dimension is a band. The sample dimension information include such things as description, data type of the value (bit, byte, integer...), the no data values, minimum and maximum values and a color table if one is associated with the dimension. A coverage must have at least one sample dimension.

Parameters:
index - Index for sample dimension to retrieve. Indices are numbered 0 to ( n-1).
Returns:
Sample dimension information for the coverage.
Throws:
java.lang.IndexOutOfBoundsException - if index is out of bounds.

getNumSources

int getNumSources()
Number of grid coverages which the grid coverage was derived from. This implementation specification does not include interfaces for creating collections of coverages therefore this value will usually be one indicating an adapted grid coverage, or zero indicating a raw grid coverage.

Returns:
The number of grid coverages which the grid coverage was derived from.

getSource

Coverage getSource(int sourceDataIndex)
                   throws java.lang.IndexOutOfBoundsException
Returns the source data for a coverage. This is intended to allow applications to establish what Coverages will be affected when others are updated, as well as to trace back to the "raw data".

Parameters:
sourceDataIndex - Source coverage index. Indexes start at 0.
Returns:
The source data for a coverage.
Throws:
java.lang.IndexOutOfBoundsException - if sourceDataIndex is out of bounds.
See Also:
getNumSources(), "org.opengis.coverage.grid.GridCoverage#getSource"

getMetadataNames

java.lang.String[] getMetadataNames()
List of metadata keywords for a coverage. If no metadata is available, the sequence will be empty.

Returns:
the list of metadata keywords for a coverage.
See Also:
getMetadataValue(java.lang.String), PropertySource.getPropertyNames()

getMetadataValue

java.lang.String getMetadataValue(java.lang.String name)
                                  throws MetadataNameNotFoundException
Retrieve the metadata value for a given metadata name.

Parameters:
name - Metadata keyword for which to retrieve data.
Returns:
the metadata value for a given metadata name.
Throws:
MetadataNameNotFoundException - if there is no value for the specified metadata name.
See Also:
getMetadataNames(), PropertySource.getProperty(java.lang.String)

getRenderableImage

java.awt.image.renderable.RenderableImage getRenderableImage(int xAxis,
                                                             int yAxis)
                                                             throws java.lang.UnsupportedOperationException,
                                                                    java.lang.IndexOutOfBoundsException
Returns 2D view of this coverage as a renderable image. This optional operation allows interoperability with Java2D. If this coverage is a "org.opengis.coverage.grid.GridCoverage" backed by a RenderedImage, the underlying image can be obtained with: getRenderableImage(0,1).createDefaultRendering()

Parameters:
xAxis - Dimension to use for the x axis.
yAxis - Dimension to use for the y axis.
Returns:
A 2D view of this coverage as a renderable image.
Throws:
java.lang.UnsupportedOperationException - if this optional operation is not supported.
java.lang.IndexOutOfBoundsException - if xAxis or yAxis is out of bounds.

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org