public final class JP2KReader extends AbstractGridCoverage2DReader implements GridCoverage2DReader
GridCoverage2D
from the data.closeMe, coverageFactory, coverageName, crs, dtLayout, EPS, gzipped, highestRes, hints, inStream, inStreamSPI, numOverviews, originalEnvelope, originalGridRange, overViewResolutions, raster2Model, source
ELEVATION_DOMAIN, ELEVATION_DOMAIN_MAXIMUM, ELEVATION_DOMAIN_MINIMUM, ELEVATION_DOMAIN_RESOLUTION, FILE_SOURCE_PROPERTY, HAS_ELEVATION_DOMAIN, HAS_TIME_DOMAIN, MULTICRS_READER, REPROJECTING_READER, SOURCE_URL_PROPERTY, TIME_DOMAIN, TIME_DOMAIN_MAXIMUM, TIME_DOMAIN_MINIMUM, TIME_DOMAIN_RESOLUTION
Constructor and Description |
---|
JP2KReader(Object input)
Creates a new instance of a
JP2KReader . |
JP2KReader(Object source,
Hints uHints)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Releases resources held by this reader.
|
protected GeneralEnvelope |
getCoverageEnvelope() |
protected GridEnvelope2D |
getCoverageGridRange() |
Format |
getFormat()
Returns the format handled by this
GridCoverageReader . |
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 |
addAllSiblings, addSiblings, checkName, createImageCoverage, createImageCoverage, createImageCoverage, createImageCoverage, decimationOnReadingControl, finalize, getCoordinateReferenceSystem, getCoordinateReferenceSystem, getCrs, getCurrentSubname, getDatasetLayout, getDatasetLayout, getDynamicParameters, getDynamicParameters, getFiles, getGridCoverageNames, getGroundControlPoints, getGroundControlPoints, getHighestRes, getImageLayout, getImageLayout, getInfo, getInfo, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getMultiLevelROIProvider, getNumOverviews, getNumOverviews, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getOverviewGridEnvelope, getOverviewGridEnvelope, getReadingResolutions, getReadingResolutions, getRescaledRasterToModel, getResolution, getResolutionLevels, getResolutionLevels, getSibling, getSource, getSourceAsFile, hasMoreGridCoverages, listSubNames, read, setlayout, setLayout, setReadParams, setReadParams, skip
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCoordinateReferenceSystem, getCoordinateReferenceSystem, getDatasetLayout, getDatasetLayout, getDynamicParameters, getDynamicParameters, getImageLayout, getImageLayout, getInfo, getInfo, getNumOverviews, getNumOverviews, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getReadingResolutions, getReadingResolutions, getResolutionLevels, getResolutionLevels, read
getCurrentSubname, getGridCoverageNames, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getSource, hasMoreGridCoverages, listSubNames, skip
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
protected void setCoverageProperties(ImageReader reader) throws IOException
ImageReader
reader
- the ImageReader
from which to retrieve metadata (if available) for
setting propertiesIOException
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 interface GridCoverageReader
getGridCoverageCount
in class AbstractGridCoverage2DReader
GridCoverageReader.getGridCoverageCount()
public void dispose()
dispose
in interface GridCoverageReader
dispose
in class AbstractGridCoverage2DReader
public Format getFormat()
GridCoverageReader
GridCoverageReader
.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 GridCoverage2DReader
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
Copyright © 1996–2019 Geotools. All rights reserved.