org.geotools.io.coverage
Class ExoreferencedGridCoverageReader

java.lang.Object
  extended byorg.geotools.io.coverage.GridCoverageReader
      extended byorg.geotools.io.coverage.ExoreferencedGridCoverageReader

Deprecated. Replaced by ExoreferencedGridCoverageReader.

public class ExoreferencedGridCoverageReader
extends GridCoverageReader

An implementation of GridCoverageReader using informations parsed by a PropertyParser object. This reader is typically used for format that stores pixel values and geographic metadata in separated files. For example, pixel values may be stored as a PNG images ou a RAW binary file, and geographic metadata (coordinate system, geographic location, etc.) may be stored in a separated text file. The text file is parsed by a PropertyParser object, while the pixel values are read by a ImageReader object.

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

Field Summary
protected  PropertyParser properties
          Deprecated. The object to use for parsing the meta-data.
 
Fields inherited from class org.geotools.io.coverage.GridCoverageReader
formatName, reader
 
Constructor Summary
ExoreferencedGridCoverageReader(java.lang.String formatName, PropertyParser parser)
          Deprecated. Construct a new ExoreferencedGridCoverageReader using the specified PropertyParser.
ExoreferencedGridCoverageReader(java.lang.String formatName, java.lang.String extension, PropertyParser parser)
          Deprecated. Construct a new ExoreferencedGridCoverageReader using the specified PropertyParser.
 
Method Summary
 CoordinateSystem getCoordinateSystem(int index)
          Deprecated. Returns the coordinate system for the GridCoverage to be read.
 Envelope getEnvelope(int index)
          Deprecated. Returns the envelope for the GridCoverage to be read.
 GridRange getGridRange(int index)
          Deprecated. Returns the grid range for the GridCoverage to be read.
 SampleDimension[] getSampleDimensions(int index)
          Deprecated. Returns the sample dimensions for each band of the GridCoverage to be read.
 void reset()
          Deprecated. Restores the GridCoverageReader to its initial state.
 void setInput(java.lang.Object input, boolean seekForwardOnly)
          Deprecated. Sets the input source to the given object.
 void setLocale(java.util.Locale locale)
          Deprecated. Sets the current Locale of this GridCoverageReader to the given value.
protected  java.lang.String toImageFileName(java.lang.String filename)
          Deprecated. Returns the filename for image data.
 
Methods inherited from class org.geotools.io.coverage.GridCoverageReader
getGridCoverage, getImageReaders, getLocale, getName, getNumImages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected PropertyParser properties
Deprecated. 
The object to use for parsing the meta-data.

Constructor Detail

ExoreferencedGridCoverageReader

public ExoreferencedGridCoverageReader(java.lang.String formatName,
                                       PropertyParser parser)
Deprecated. 
Construct a new ExoreferencedGridCoverageReader using the specified PropertyParser.

Parameters:
formatName - The name for this format. This format name should be understood by ImageIO.getImageReadersByFormatName(String), unless GridCoverageReader.getImageReaders(java.lang.Object) is overriden.
parser - The PropertyParser to use for reading geographic metadata.

ExoreferencedGridCoverageReader

public ExoreferencedGridCoverageReader(java.lang.String formatName,
                                       java.lang.String extension,
                                       PropertyParser parser)
Deprecated. 
Construct a new ExoreferencedGridCoverageReader using the specified PropertyParser.

Parameters:
formatName - The name for this format. This format name should be understood by ImageIO.getImageReadersByFormatName(String), unless GridCoverageReader.getImageReaders(java.lang.Object) is overriden.
extension - Filename's extensions for file of this format.
parser - The PropertyParser to use for reading geographic metadata.
Method Detail

reset

public void reset()
           throws java.io.IOException
Deprecated. 
Restores the GridCoverageReader to its initial state.

Overrides:
reset in class GridCoverageReader
Throws:
java.io.IOException - if an error occurs while disposing resources.

setInput

public void setInput(java.lang.Object input,
                     boolean seekForwardOnly)
              throws java.io.IOException
Deprecated. 
Sets the input source to the given object. The input must be File or an URL object. The input source must be the metadata file or URL. The image file or URL will be derived from the metadata filename by a call to toImageFileName(java.lang.String), which may be overriden.

Overrides:
setInput in class GridCoverageReader
Parameters:
input - The File or URL to be read.
seekForwardOnly - if true, grid coverages and metadata may only be read in ascending order from the input source.
Throws:
java.io.IOException - if an I/O operation failed.
java.lang.IllegalArgumentException - if input is not an instance of a classe supported by this reader.

toImageFileName

protected java.lang.String toImageFileName(java.lang.String filename)
Deprecated. 
Returns the filename for image data. This method is invoked by setInput(java.lang.Object, boolean) after properties has been loaded. Default implementation just replace the file extension by the extension argument specified to the constructor.

Parameters:
filename - The filename part of metadata file. This is the filename part of the file supplied by users to setInput(java.lang.Object, boolean).
Returns:
The filename to use for for the image file. The directory is assumed to be the same than the metadata file.

getCoordinateSystem

public CoordinateSystem getCoordinateSystem(int index)
                                     throws java.io.IOException
Deprecated. 
Returns the coordinate system for the GridCoverage to be read. The default implementation invokes properties.getCoordinateSystem().

Specified by:
getCoordinateSystem in class GridCoverageReader
Parameters:
index - The index of the image to be queried.
Returns:
The coordinate system for the GridCoverage at the specified index.
Throws:
java.lang.IllegalStateException - if the input source has not been set.
java.lang.IndexOutOfBoundsException - if the supplied index is out of bounds.
java.io.IOException - if an error occurs reading the width information from the input source.

getEnvelope

public Envelope getEnvelope(int index)
                     throws java.io.IOException
Deprecated. 
Returns the envelope for the GridCoverage to be read. The default implementation invokes properties.getEnvelope().

Specified by:
getEnvelope in class GridCoverageReader
Parameters:
index - The index of the image to be queried.
Returns:
The envelope for the GridCoverage at the specified index.
Throws:
java.lang.IllegalStateException - if the input source has not been set.
java.lang.IndexOutOfBoundsException - if the supplied index is out of bounds.
java.io.IOException - if an error occurs reading the width information from the input source.

getGridRange

public GridRange getGridRange(int index)
                       throws java.io.IOException
Deprecated. 
Returns the grid range for the GridCoverage to be read. The default implementation try to invoke properties.getGridRange(), and fallback to super.getGridRange(index) if the later fails.

Overrides:
getGridRange in class GridCoverageReader
Parameters:
index - The index of the image to be queried.
Returns:
The grid range for the GridCoverage at the specified index.
Throws:
java.lang.IllegalStateException - if the input source has not been set.
java.lang.IndexOutOfBoundsException - if the supplied index is out of bounds.
java.io.IOException - if an error occurs reading the width information from the input source.

getSampleDimensions

public SampleDimension[] getSampleDimensions(int index)
                                      throws java.io.IOException
Deprecated. 
Returns the sample dimensions for each band of the GridCoverage to be read. If sample dimensions are not known, then this method returns null. The default implementation invokes properties.getSampleDimensions().

Overrides:
getSampleDimensions in class GridCoverageReader
Parameters:
index - The index of the image to be queried.
Returns:
The category lists for the GridCoverage at the specified index. This array's length must be equals to the number of bands in GridCoverage.
Throws:
java.lang.IllegalStateException - if the input source has not been set.
java.lang.IndexOutOfBoundsException - if the supplied index is out of bounds.
java.io.IOException - if an error occurs reading the width information from the input source.

setLocale

public void setLocale(java.util.Locale locale)
Deprecated. 
Sets the current Locale of this GridCoverageReader to the given value. A value of null removes any previous setting, and indicates that the reader should localize as it sees fit.

Overrides:
setLocale in class GridCoverageReader


Copyright © GeoTools. All Rights Reserved.