|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractGridCoverage2DReader
JP2KReader
public final class JP2KReader
This class can read a JP2K data source and create a GridCoverage2D
from the data.
Field Summary |
---|
Fields inherited from class AbstractGridCoverage2DReader |
---|
closeMe, coverageFactory, coverageName, crs, demColors, EPS, gzipped, highestRes, hints, inStream, numOverviews, originalEnvelope, originalGridRange, overViewResolutions, raster2Model, source |
Constructor Summary | |
---|---|
JP2KReader(Object input)
Creates a new instance of a JP2KReader . |
|
JP2KReader(Object source,
Hints uHints)
Constructor. |
Method Summary | |
---|---|
void |
dispose()
Releases resources held by this reader. |
protected GeneralEnvelope |
getCoverageEnvelope()
|
protected GridEnvelope2D |
getCoverageGridRange()
|
Format |
getFormat()
|
int |
getGridCoverageCount()
Number of coverages for this reader is 1 |
protected void |
parsePRJFile()
Gets the coordinate reference system that will be associated to the GridCoverage by looking for a related PRJ. |
protected void |
parseWorldFile()
Checks whether a world file is associated with the data source. |
GridCoverage2D |
read(GeneralParameterValue[] params)
Read the current grid coverage from the stream. |
protected void |
setCoverageEnvelope(GeneralEnvelope coverageEnvelope)
|
protected void |
setCoverageGridRange(GridEnvelope2D coverageGridRange)
|
protected void |
setCoverageProperties(ImageReader reader)
Setting Envelope, GridRange and CRS from the given ImageReader |
Methods inherited from class Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface GridCoverageReader |
---|
getCurrentSubname, getMetadataNames, getMetadataValue, getSource, hasMoreGridCoverages, listSubNames, skip |
Constructor Detail |
---|
public JP2KReader(Object input) throws IOException
JP2KReader
. I assume nothing about
file extension.
input
- Source object for which we want to build an JP2KReader.
DataSourceException
IOException
public JP2KReader(Object source, Hints uHints) throws IOException
source
- The source object.
IOException
UnsupportedEncodingException
Method Detail |
---|
protected void setCoverageProperties(ImageReader reader) throws IOException
ImageReader
reader
- the ImageReader
from which to retrieve metadata
(if available) for setting properties
IOException
protected void setCoverageEnvelope(GeneralEnvelope coverageEnvelope)
nativeEnvelope
- the nativeEnvelope to setprotected GeneralEnvelope getCoverageEnvelope()
protected void setCoverageGridRange(GridEnvelope2D coverageGridRange)
nativeGridRange
- the nativeGridRange to setprotected GridEnvelope2D getCoverageGridRange()
public int getGridCoverageCount()
getGridCoverageCount
in class AbstractGridCoverage2DReader
org.opengis.coverage.grid.GridCoverageReader#getGridCoverageCount()
public void dispose()
dispose
in interface GridCoverageReader
dispose
in class AbstractGridCoverage2DReader
public Format getFormat()
getFormat
in interface GridCoverageReader
GridCoverageReader.getFormat()
public GridCoverage2D read(GeneralParameterValue[] params) throws IOException
AbstractGridCoverage2DReader
Example:
The method AbstractGridCoverage2DReader.hasMoreGridCoverages()
should be invoked first in order to verify that a
coverage is available.
read
in interface GridCoverageReader
read
in class AbstractGridCoverage2DReader
params
- Optional parameters matching Format.getReadParameters()
.
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.GridCoverageReader.read(org.opengis.parameter.GeneralParameterValue[])
protected void parsePRJFile() throws UnsupportedEncodingException
GridCoverage
by looking for a related PRJ.
UnsupportedEncodingException
protected void parseWorldFile() throws IOException
IllegalStateException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |