public abstract class BaseGridCoverage2DReader extends AbstractGridCoverage2DReader implements GridCoverage2DReader
Modifier and Type | Field and Description |
---|---|
protected MultiLevelROI |
multiLevelRoi
This reader is made of a single file so the MultiLevelROI is unique
|
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
Modifier | Constructor and Description |
---|---|
protected |
BaseGridCoverage2DReader(Object input,
Hints hints,
String worldFileExtension,
ImageReaderSpi formatSpecificSpi)
Creates a new instance of a
BaseGridCoverage2DReader . |
Modifier and Type | Method and Description |
---|---|
String |
getCoverageName() |
int |
getGridCoverageCount()
Retrieve the number of coverages contained within the input source.
|
ServiceInfo |
getInfo()
Information about this source.
|
ResourceInfo |
getInfo(String subname)
Information about the named gridcoverage.
|
protected File |
getInputFile() |
protected MultiLevelROI |
getMultiLevelRoi() |
protected MultiLevelROIProvider |
getMultiLevelROIProvider(String coverageName) |
boolean |
hasMoreGridCoverages()
Returns
true if there is at least one more grid coverage available on the stream. |
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)
Returns a
GridCoverage from this reader in compliance with the specified parameters. |
protected abstract void |
setCoverageProperties(ImageReader reader)
Implement this method to setup the coverage properties (Envelope, CRS, GridRange) using the
provided
ImageReader |
addAllSiblings, addSiblings, checkName, createImageCoverage, createImageCoverage, createImageCoverage, createImageCoverage, decimationOnReadingControl, dispose, finalize, getCoordinateReferenceSystem, getCoordinateReferenceSystem, getCrs, getCurrentSubname, getDatasetLayout, getDatasetLayout, getDynamicParameters, getDynamicParameters, getFiles, getGridCoverageNames, getGroundControlPoints, getGroundControlPoints, getHighestRes, getImageLayout, getImageLayout, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getNumOverviews, getNumOverviews, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getOverviewGridEnvelope, getOverviewGridEnvelope, getReadingResolutions, getReadingResolutions, getRescaledRasterToModel, getResolution, getResolutionLevels, getResolutionLevels, getSibling, getSource, getSourceAsFile, 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, getNumOverviews, getNumOverviews, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getReadingResolutions, getReadingResolutions, getResolutionLevels, getResolutionLevels, read
dispose, getCurrentSubname, getFormat, getGridCoverageNames, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getSource, listSubNames, skip
protected MultiLevelROI multiLevelRoi
protected BaseGridCoverage2DReader(Object input, Hints hints, String worldFileExtension, ImageReaderSpi formatSpecificSpi) throws DataSourceException
BaseGridCoverage2DReader
. I assume nothing about file
extension.input
- Source object for which we want to build a BaseGridCoverage2DReader
.hints
- Hints to be used by this reader throughout his life.worldFileExtension
- the specific world file extension of the underlying formatformatSpecificSpi
- an instance of a proper ImageReaderSpi
.DataSourceException
protected abstract void setCoverageProperties(ImageReader reader) throws IOException
ImageReader
IOException
protected MultiLevelROIProvider getMultiLevelROIProvider(String coverageName)
getMultiLevelROIProvider
in class AbstractGridCoverage2DReader
public GridCoverage2D read(GeneralParameterValue[] params) throws IllegalArgumentException, IOException
GridCoverage
from this reader in compliance with the specified parameters.read
in interface GridCoverage2DReader
read
in interface GridCoverageReader
read
in class AbstractGridCoverage2DReader
params
- a GeneralParameterValue
array to customize the read operation.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.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
protected void parsePRJFile()
GridCoverage
by
looking for a related PRJ.protected void parseWorldFile()
IllegalStateException
IOException
public ServiceInfo getInfo()
getInfo
in interface GridCoverage2DReader
getInfo
in class AbstractGridCoverage2DReader
public ResourceInfo getInfo(String subname)
getInfo
in interface GridCoverage2DReader
getInfo
in class AbstractGridCoverage2DReader
subname
- Name indicing grid coverage to describeprotected File getInputFile()
public String getCoverageName()
public int getGridCoverageCount()
GridCoverageReader
getGridCoverageCount
in interface GridCoverageReader
getGridCoverageCount
in class AbstractGridCoverage2DReader
GridCoverageReader.getGridCoverageCount()
public boolean hasMoreGridCoverages()
GridCoverageReader
true
if there is at least one more grid coverage available on the stream.hasMoreGridCoverages
in interface GridCoverageReader
hasMoreGridCoverages
in class AbstractGridCoverage2DReader
GridCoverageReader.hasMoreGridCoverages()
protected MultiLevelROI getMultiLevelRoi()
Copyright © 1996–2019 Geotools. All rights reserved.