org.geotools.gce.gtopo30
Class GTopo30Reader

java.lang.Object
  extended by org.geotools.coverage.grid.io.AbstractGridCoverage2DReader
      extended by org.geotools.gce.gtopo30.GTopo30Reader
All Implemented Interfaces:
org.opengis.coverage.grid.GridCoverageReader

public final class GTopo30Reader
extends AbstractGridCoverage2DReader
implements org.opengis.coverage.grid.GridCoverageReader

This class provides a GridCoverageReader for the GTopo30Format.

Author:
Simone Giannecchini, jeichar, mkraemer

Field Summary
 
Fields inherited from class org.geotools.coverage.grid.io.AbstractGridCoverage2DReader
closeMe, coverageFactory, coverageName, crs, demColors, EPS, gzipped, highestRes, hints, inStream, numOverviews, originalEnvelope, originalGridRange, overViewResolutions, raster2Model, source
 
Constructor Summary
GTopo30Reader(java.lang.Object source)
          GTopo30Reader constructor.
GTopo30Reader(java.lang.Object source, Hints hints)
          GTopo30Reader constructor.
 
Method Summary
 org.opengis.coverage.grid.Format getFormat()
           
 GridCoverage2D read(org.opengis.parameter.GeneralParameterValue[] params)
          Read the current grid coverage from the stream.
 
Methods inherited from class org.geotools.coverage.grid.io.AbstractGridCoverage2DReader
createImageCoverage, createImageCoverage, decimationOnReadingControl, dispose, finalize, getCrs, getCurrentSubname, getGridCoverageCount, getInfo, getMetadataNames, getMetadataValue, getOriginalEnvelope, getOriginalGridRange, getOriginalGridToWorld, getResolution, getSource, hasMoreGridCoverages, listSubNames, setReadParams, skip
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.coverage.grid.GridCoverageReader
dispose, getCurrentSubname, getMetadataNames, getMetadataValue, getSource, hasMoreGridCoverages, listSubNames, skip
 

Constructor Detail

GTopo30Reader

public GTopo30Reader(java.lang.Object source)
              throws java.io.IOException
GTopo30Reader constructor.

Parameters:
source - The source object (can be a File, an URL or a String representing a File or an URL).
Throws:
java.net.MalformedURLException - if the URL does not correspond to one of the GTopo30 files
java.io.IOException
DataSourceException - if the given url points to an unrecognized file
java.lang.IllegalArgumentException - DOCUMENT ME!

GTopo30Reader

public GTopo30Reader(java.lang.Object source,
                     Hints hints)
              throws java.io.IOException
GTopo30Reader constructor.

Parameters:
source - The source object (can be a File, an URL or a String representing a File or an URL).
Throws:
java.net.MalformedURLException - if the URL does not correspond to one of the GTopo30 files
java.io.IOException
DataSourceException - if the given url points to an unrecognized file
java.lang.IllegalArgumentException - DOCUMENT ME!
Method Detail

getFormat

public org.opengis.coverage.grid.Format getFormat()
Specified by:
getFormat in interface org.opengis.coverage.grid.GridCoverageReader
See Also:
GridCoverageReader.getFormat()

read

public GridCoverage2D read(org.opengis.parameter.GeneralParameterValue[] params)
                    throws java.lang.IllegalArgumentException,
                           java.io.IOException
Description copied from class: AbstractGridCoverage2DReader
Read the current grid coverage from the stream.

Example:


 
The method AbstractGridCoverage2DReader.hasMoreGridCoverages() should be invoked first in order to verify that a coverage is available.

Specified by:
read in interface org.opengis.coverage.grid.GridCoverageReader
Specified by:
read in class AbstractGridCoverage2DReader
Parameters:
params - Optional parameters matching Format.getReadParameters().
Returns:
a grid coverage from the input source.
Throws:
java.io.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.
java.lang.IllegalArgumentException
See Also:
GridCoverageReader.read(org.opengis.parameter.GeneralParameterValue[])


Copyright © 1996-2010 Geotools. All Rights Reserved.