|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.io.coverage.GridCoverageReader org.geotools.io.coverage.ExoreferencedGridCoverageReader
ExoreferencedGridCoverageReader
.
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.
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 |
protected PropertyParser properties
Constructor Detail |
public ExoreferencedGridCoverageReader(java.lang.String formatName, PropertyParser parser)
ExoreferencedGridCoverageReader
using the specified PropertyParser
.
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.public ExoreferencedGridCoverageReader(java.lang.String formatName, java.lang.String extension, PropertyParser parser)
ExoreferencedGridCoverageReader
using the specified PropertyParser
.
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 |
public void reset() throws java.io.IOException
GridCoverageReader
to its initial state.
reset
in class GridCoverageReader
java.io.IOException
- if an error occurs while disposing resources.public void setInput(java.lang.Object input, boolean seekForwardOnly) throws java.io.IOException
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.
setInput
in class GridCoverageReader
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.
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.protected java.lang.String toImageFileName(java.lang.String filename)
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.
filename
- The filename part of metadata file. This
is the filename part of the file supplied by users
to setInput(java.lang.Object, boolean)
.
public CoordinateSystem getCoordinateSystem(int index) throws java.io.IOException
GridCoverage
to be read.
The default implementation invokes
properties
.getCoordinateSystem()
.
getCoordinateSystem
in class GridCoverageReader
index
- The index of the image to be queried.
GridCoverage
at the specified index.
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.public Envelope getEnvelope(int index) throws java.io.IOException
GridCoverage
to be read.
The default implementation invokes
properties
.getEnvelope()
.
getEnvelope
in class GridCoverageReader
index
- The index of the image to be queried.
GridCoverage
at the specified index.
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.public GridRange getGridRange(int index) throws java.io.IOException
GridCoverage
to be read.
The default implementation try to invoke
properties
.getGridRange()
,
and fallback to super.getGridRange(index)
if the later fails.
getGridRange
in class GridCoverageReader
index
- The index of the image to be queried.
GridCoverage
at the specified index.
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.public SampleDimension[] getSampleDimensions(int index) throws java.io.IOException
GridCoverage
to be read. If sample dimensions are not known, then this method returns
null
. The default implementation invokes
properties
.getSampleDimensions()
.
getSampleDimensions
in class GridCoverageReader
index
- The index of the image to be queried.
GridCoverage
at the specified index.
This array's length must be equals to the number of bands in GridCoverage
.
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.public void setLocale(java.util.Locale locale)
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.
setLocale
in class GridCoverageReader
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |