deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.model.coverage.grid
Class GeoTIFFGridCoverageReader

java.lang.Object
  extended by org.deegree.model.coverage.grid.AbstractGridCoverageReader
      extended by org.deegree.model.coverage.grid.GeoTIFFGridCoverageReader
All Implemented Interfaces:
GridCoverageReader

public class GeoTIFFGridCoverageReader
extends AbstractGridCoverageReader

GridCoverageReader for reading files as defined by the deegree CoverageOffering Extension type 'File'. Known formats are: tiff, GeoTiff, jpeg, bmp, gif, png and img (IDRISI)

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: mschneider $

Field Summary
 
Fields inherited from class org.deegree.model.coverage.grid.AbstractGridCoverageReader
description, envelope, format, source
 
Constructor Summary
GeoTIFFGridCoverageReader(File source, CoverageOffering description, Envelope envelope, Format format)
           
GeoTIFFGridCoverageReader(InputStream source, CoverageOffering description, Envelope envelope, Format format)
           
 
Method Summary
 void dispose()
          Allows any resources held by this object to be released.
 GridCoverage read(GeneralParameterValueIm[] parameters)
          Read the grid coverage from the current stream position, and move to the next grid coverage.
 
Methods inherited from class org.deegree.model.coverage.grid.AbstractGridCoverageReader
calcLonLatEnvelope, getCurrentSubname, getFormat, getMetadataNames, getMetadataValue, getSource, listSubNames, setCurrentSubname, setMetadataValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoTIFFGridCoverageReader

public GeoTIFFGridCoverageReader(File source,
                                 CoverageOffering description,
                                 Envelope envelope,
                                 Format format)
Parameters:
source - source file of the coverage
description - description of the data contained in the source file
envelope - desired envelope of the coverage to be read
format - image format of the source file

GeoTIFFGridCoverageReader

public GeoTIFFGridCoverageReader(InputStream source,
                                 CoverageOffering description,
                                 Envelope envelope,
                                 Format format)
Parameters:
source -
description - description of the data contained in the source file
envelope - desired envelope of the coverage to be read
format - image format of the source file
Method Detail

read

public GridCoverage read(GeneralParameterValueIm[] parameters)
                  throws InvalidParameterNameException,
                         InvalidParameterValueException,
                         ParameterNotFoundException,
                         IOException
Read the grid coverage from the current stream position, and move to the next grid coverage.

Parameters:
parameters - An optional set of parameters. Should be any or all of the parameters returned by "org.opengis.coverage.grid.Format#getReadParameters".
Returns:
A new grid coverage from the input source.
Throws:
InvalidParameterNameException - if a parameter in parameters doesn't have a recognized name.
InvalidParameterValueException - if a parameter in parameters doesn't have a valid value.
ParameterNotFoundException - if a parameter was required for the operation but was not provided in the parameters list.
IOException - if a read operation failed for some other input/output reason, including FileNotFoundException if no file with the given name can be found, or IIOException if an error was thrown by the underlying image library.

dispose

public void dispose()
             throws IOException
Allows any resources held by this object to be released. The result of calling any other method subsequent to a call to this method is undefined. It is important for applications to call this method when they know they will no longer be using this GridCoverageReader. Otherwise, the reader may continue to hold on to resources indefinitely.

Throws:
IOException - if an error occured while disposing resources (for example while closing a file).

deegree 2.3 (2010/04/09 10:10 build-4-official)

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