|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GridCoverageReader
Support for reading grid coverages out of a persisten store. Instance of
GridCoverageReader
are obtained through a call to
GridCoverageExchange.getReader(java.lang.Object)
. Grid coverages are usually
read from the input stream in a sequential order.
WARNING: THIS CLASS WILL CHANGE. Current API is derived from OGC Grid Coverages Implementation specification 1.0. We plan to replace it by new interfaces derived from ISO 19123 (Schema for coverage geometry and functions). Current interfaces should be considered as legacy and are included in this distribution only because they were part of GeoAPI 1.0 release. We will try to preserve as much compatibility as possible, but no migration plan has been determined yet. |
GridCoverageExchange.getReader(java.lang.Object)
,
ImageReader
Method Summary | |
---|---|
void |
dispose()
Deprecated. Allows any resources held by this object to be released. |
String |
getCurrentSubname()
Deprecated. Returns the name for the next grid coverage to be read from the input source. |
Format |
getFormat()
Deprecated. Returns the format handled by this GridCoverageReader . |
String[] |
getMetadataNames()
Deprecated. Returns the list of metadata keywords associated with the input source as a whole (not associated with any particular grid coverage). |
String |
getMetadataValue(String name)
Deprecated. Retrieve the metadata value for a given metadata name. |
Object |
getSource()
Deprecated. Returns the input source. |
boolean |
hasMoreGridCoverages()
Deprecated. Returns true if there is at least one more grid coverage
available on the stream. |
String[] |
listSubNames()
Deprecated. Retrieve the list of grid coverages contained within the input source. |
GridCoverage |
read(GeneralParameterValue[] parameters)
Deprecated. Read the grid coverage from the current stream position, and move to the next grid coverage. |
void |
skip()
Deprecated. Skip the current grid coverage without reading it, and move the stream position to the next grid coverage. |
Method Detail |
---|
Format getFormat()
GridCoverageReader
.
Object getSource()
GridCoverageExchange.getReader(java.lang.Object)
method. It can be a
String
, an InputStream
, a
FileChannel
, whatever.
String[] getMetadataNames() throws IOException
IOException
- if an error occurs during reading.String getMetadataValue(String name) throws IOException, MetadataNameNotFoundException
name
- Metadata keyword for which to retrieve metadata.
getMetadataNames()
.
IOException
- if an error occurs during reading.
MetadataNameNotFoundException
- if there is no value for the specified metadata name.String[] listSubNames() throws IOException
IOException
- if an error occurs during reading.String getCurrentSubname() throws IOException
IOException
- if an error occurs during reading.boolean hasMoreGridCoverages() throws IOException
true
if there is at least one more grid coverage
available on the stream.
IOException
GridCoverage read(GeneralParameterValue[] parameters) throws IllegalArgumentException, IOException
hasMoreGridCoverages()
should be invoked first in order
to verify that a coverage is available.
parameters
- An optional set of parameters. Should be any or all of the
parameters returned by Format.getReadParameters()
.
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.
CannotCreateGridCoverageException
- if the coverage can't be created for a logical
reason (for example an unsupported format, or an inconsistency found in the data).
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.
IllegalArgumentException
void skip() throws IOException
IOException
- if the operation failed.void dispose() throws IOException
GridCoverageReader
.
Otherwise, the reader may continue to hold on to resources indefinitely.
IOException
- if an error occured while disposing resources (for example while closing
a file).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |