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

org.deegree.model.coverage.grid
Class GridCoverageExchange

java.lang.Object
  extended by org.deegree.model.coverage.grid.GridCoverageExchange

public class GridCoverageExchange
extends java.lang.Object

Support for creation of grid coverages from persistent formats as well as exporting a grid coverage to a persistent formats. For example, it allows for creation of grid coverages from the GeoTIFF Well-known binary format and exporting to the GeoTIFF file format. Basic implementations only require creation of grid coverages from a file format or resource. More sophesticated implementations may extract the grid coverages from a database. In such case, a GridCoverageExchange instance will hold a connection to a specific database and the dispose method will need to be invoked in order to close this connection.

Since:
2.0
Version:
1.0
Author:
Andreas Poth

Field Summary
static java.lang.String SHAPE_DIR_NAME
           
static java.lang.String SHAPE_IMAGE_FILENAME
           
 
Constructor Summary
GridCoverageExchange(CoverageOffering coverageOffering)
           
 
Method Summary
 GridCoverageReader getReader(java.io.InputStream source, CoverageOffering description, Envelope envelope, Format format)
          This method is a deegree specific enhancement of the GridCoverageExchange class/interface as defined by GeoAPI.
 GridCoverageReader getReader(java.lang.Object source)
          Returns a grid coverage reader that can manage the specified source
 GridCoverageReader getReader(java.lang.Object[] resources, CoverageOffering description, Envelope envelope, Format format)
          This method is a deegree specific enhancement of the GridCoverageExchange class/interface as defined by GeoAPI.
 GridCoverageReader getReader(java.lang.Object resource, CoverageOffering description, Envelope envelope, Format format)
          This method is a deegree specific enhancement of the GridCoverageExchange class/interface as defined by GeoAPI.
 GridCoverageWriter getWriter(java.lang.Object destination, Format format)
          Returns a GridCoverageWriter that can write the specified format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHAPE_IMAGE_FILENAME

public static final java.lang.String SHAPE_IMAGE_FILENAME
See Also:
Constant Field Values

SHAPE_DIR_NAME

public static final java.lang.String SHAPE_DIR_NAME
See Also:
Constant Field Values
Constructor Detail

GridCoverageExchange

public GridCoverageExchange(CoverageOffering coverageOffering)
Parameters:
coverageOffering -
Method Detail

getReader

public GridCoverageReader getReader(java.lang.Object source)
                             throws java.io.IOException
Returns a grid coverage reader that can manage the specified source

Parameters:
source - An object that specifies somehow the data source. Can be a String, an InputStream, a FileChannel, whatever. It's up to the associated grid coverage reader to make meaningful use of it.
Returns:
The grid coverage reader.
Throws:
java.io.IOException - if an error occurs during reading.
revisit
We need a mechanism to allow the right GridCoverageReader Something like an SPI. What if we can't find a GridCoverageReader? Do we return null or throw an Exception?

getReader

public GridCoverageReader getReader(java.io.InputStream source,
                                    CoverageOffering description,
                                    Envelope envelope,
                                    Format format)
                             throws java.io.IOException
This method is a deegree specific enhancement of the GridCoverageExchange class/interface as defined by GeoAPI. Returns a grid coverage reader that can manage the specified source

Parameters:
source - An object that specifies somehow the data source.
description - an object describing the grid coverage and the access to avaiable metadata
envelope -
format -
Returns:
The grid coverage reader.
Throws:
java.io.IOException - if an error occurs during reading.
revisit
We need a mechanism to allow the right GridCoverageReader Something like an SPI. What if we can't find a GridCoverageReader? Do we return null or throw an Exception?

getReader

public GridCoverageReader getReader(java.lang.Object resource,
                                    CoverageOffering description,
                                    Envelope envelope,
                                    Format format)
                             throws java.io.IOException,
                                    InvalidParameterValueException
This method is a deegree specific enhancement of the GridCoverageExchange class/interface as defined by GeoAPI. Returns a grid coverage reader that can manage the specified source

Parameters:
resource - a string that specifies somehow the data source (e.g. a file).
description - an object describing the grid coverage and the access to avaiable metadata
envelope -
format -
Returns:
The grid coverage reader.
Throws:
java.io.IOException - if an error occurs during reading.
InvalidParameterValueException
revisit
We need a mechanism to allow the right GridCoverageReader Something like an SPI. What if we can't find a GridCoverageReader? Do we return null or throw an Exception?

getReader

public GridCoverageReader getReader(java.lang.Object[] resources,
                                    CoverageOffering description,
                                    Envelope envelope,
                                    Format format)
                             throws java.io.IOException,
                                    InvalidParameterValueException
This method is a deegree specific enhancement of the GridCoverageExchange class/interface as defined by GeoAPI. Returns a grid coverage reader that can manage the specified source

Parameters:
resources - an array strings that specifies somehow the data sources (e.g. some files).
description - an object describing the grid coverage and the access to avaiable metadata
envelope -
format -
Returns:
The grid coverage reader.
Throws:
java.io.IOException - if an error occurs during reading.
InvalidParameterValueException
revisit
We need a mechanism to allow the right GridCoverageReader Something like an SPI. What if we can't find a GridCoverageReader? Do we return null or throw an Exception?

getWriter

public GridCoverageWriter getWriter(java.lang.Object destination,
                                    Format format)
                             throws java.io.IOException
Returns a GridCoverageWriter that can write the specified format. The file format name is determined from the Format interface. Sample file formats include:
"GeoTIFF"   - GeoTIFF
"PIX"   - PCI Geomatics PIX
"HDF-EOS"   - NASA HDF-EOS
"NITF"   - National Image Transfer Format
"STDS-DEM"   - Standard Transfer Data Standard

Parameters:
destination - An object that specifies somehow the data destination. Can be a String, an OutputStream, a FileChannel, whatever. It's up to the associated grid coverage writer to make meaningful use of it.
format - the output format.
Returns:
The grid coverage writer.
Throws:
java.io.IOException - if an error occurs during reading.

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