Interface GridCoverage2DReader
- All Superinterfaces:
GridCoverageReader
- All Known Subinterfaces:
StructuredGridCoverage2DReader
- All Known Implementing Classes:
AbstractGridCoverage2DReader
,AIGReader
,ArcGridReader
,BaseGDALGridCoverage2DReader
,BaseGridCoverage2DReader
,DTEDReader
,ECWReader
,EnviHdrReader
,ErdasImgReader
,EsriHdrReader
,GeoPackageReader
,GeoTiffReader
,GrassCoverageReader
,IDRISIReader
,ImageMosaicReader
,ImagePyramidReader
,JP2ECWReader
,JP2KReader
,JP2KReader
,JP2MrSIDReader
,MBTilesReader
,MrSIDReader
,NetCDFReader
,NITFReader
,PGRasterReader
,RPFTOCReader
,SRPReader
,TPKReader
,VRTReader
,VSIReader
,WMSCoverageReader
,WMTSCoverageReader
,WorldImageReader
Data access method take a coverageName
supplied by GridCoverageReader.getGridCoverageNames()
allowing each data GridCoverage2D to be accessed independently.
In addition static keywords for use with GridCoverageReader.getMetadataNames(String coverageName)
have
been provided.
- Author:
- Daniele Romagnoli, GeoSolutions SAS, Andrea Aime, GeoSolutions SAS, Simone Giannecchini, GeoSolutions SAS
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Elevation domain (comma separated list of values)static final String
Elevation domain maximum valuestatic final String
Elevation domain minimum valuestatic final String
Elevation domain resolutionstatic final String
If a coverage has this property is means it been read straight out of a file without any sub-setting, it means the coverage represents the full contents of the file.static final String
Whether the elevation is expressed as a full domain or min/max/resolution (true if domain list available)static final String
If the time domain is available (or if a min/max/resolution approach has been chosen)static final String
When the above MULTICRS_READER property is present and evaluates to "true", this property may contain the list of internal EPSG Codes of the multiple CRS, if the reader implements it.static final String
This property is present, and evaluates to "true", if the reader internally has multiple CRS elements, even if it advertises a single CRS in output (e.g., it won't perform a general reprojection for us, but generate and output in its declared CRS)static final String
The name of the property containing the eventual GDALPAMDataset
for the coverage at hand.static final String
This property is present, and evaluates to "true", if the reader can do reprojection on its own (that is, it is not backed by actual data, but by a remote service that can perform reprojection for us).static final String
Name of aGridCoverage2D
property that is aURL
for the original source of the coverage.static final String
The time domain (comma separated list of values)static final String
The time domain max valuestatic final String
The time domain min valuestatic final String
Time domain resolution (when using min/max/resolution) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves theCoordinateReferenceSystem
associated to the default coverage for thisGridCoverage2DReader
.getCoordinateReferenceSystem
(String coverageName) Retrieves theCoordinateReferenceSystem
associated to thisGridCoverage2DReader
for the specified coverageName.DatasetLayout
Returns theDatasetLayout
for the coverage.DatasetLayout
getDatasetLayout
(String coverageName) Returns theDatasetLayout
for the specified coverage.Return theSet
of dynamic read parameters supported by thisGridCoverage2DReader
for the default coverage.getDynamicParameters
(String coverageName) Return theSet
of dynamic read parameters supported by thisGridCoverage2DReader
for the specified coverage.ImageLayout
Retrieve theImageLayout
for the default coverage.ImageLayout
getImageLayout
(String coverageName) Retrieve theImageLayout
for the specified coverage.getInfo()
Information about the store.Information about a specific resource.Return the originalGeneralBounds
for the default coverage served by the underlying store.getOriginalEnvelope
(String coverageName) Return the originalGeneralBounds
for the specified coverageName.Retrieves theGridEnvelope
associated to the default coverage for thisGridCoverage2DReader
.getOriginalGridRange
(String coverageName) Retrieves theGridEnvelope
associated to the specified coverageName for thisGridCoverage2DReader
.getOriginalGridToWorld
(String coverageName, PixelInCell pixInCell) Retrieves theMathTransform
associated to the requested coverageName for thisGridCoverage2DReader
.getOriginalGridToWorld
(PixelInCell pixInCell) Retrieves theMathTransform
associated to the default coverage for thisGridCoverage2DReader
.double[]
getReadingResolutions
(String coverageName, OverviewPolicy policy, double[] requestedResolution) Return the resolution of the overview which would be picked out for the provided requested resolution using the providedOverviewPolicy
.double[]
getReadingResolutions
(OverviewPolicy policy, double[] requestedResolution) Return the resolution of the overview which would be picked out for the provided requested resolution using the providedOverviewPolicy
.double[][]
Retrieve the resolution levels for the default coverage.double[][]
getResolutionLevels
(String coverageName) Retrieve the resolution levels for the specified coverage.read
(String coverageName, GeneralParameterValue... parameters) Retrieves theGridEnvelope
associated to the specified coverageName for thisGridCoverage2DReader
.read
(GeneralParameterValue... parameters) Created aGridCoverage2D
out of thisGridCoverage2DReader
for the default coverage.Methods inherited from interface GridCoverageReader
dispose, getFormat, getGridCoverageCount, getGridCoverageNames, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getSource
-
Field Details
-
TIME_DOMAIN
The time domain (comma separated list of values)- See Also:
-
TIME_DOMAIN_RESOLUTION
Time domain resolution (when using min/max/resolution)- See Also:
-
HAS_TIME_DOMAIN
If the time domain is available (or if a min/max/resolution approach has been chosen)- See Also:
-
TIME_DOMAIN_MAXIMUM
The time domain max value- See Also:
-
TIME_DOMAIN_MINIMUM
The time domain min value- See Also:
-
HAS_ELEVATION_DOMAIN
Whether the elevation is expressed as a full domain or min/max/resolution (true if domain list available)- See Also:
-
ELEVATION_DOMAIN
Elevation domain (comma separated list of values)- See Also:
-
ELEVATION_DOMAIN_MAXIMUM
Elevation domain maximum value- See Also:
-
ELEVATION_DOMAIN_MINIMUM
Elevation domain minimum value- See Also:
-
ELEVATION_DOMAIN_RESOLUTION
Elevation domain resolution- See Also:
-
FILE_SOURCE_PROPERTY
If a coverage has this property is means it been read straight out of a file without any sub-setting, it means the coverage represents the full contents of the file. This can be used for different types of optimizations, such as avoiding reading and re-encoding the original file when the original file would do.- See Also:
-
SOURCE_URL_PROPERTY
Name of aGridCoverage2D
property that is aURL
for the original source of the coverage. ThisURL
might be used to obtain further information on the coverage that is not otherwise available through theGridCoverage2D
API.- See Also:
-
REPROJECTING_READER
This property is present, and evaluates to "true", if the reader can do reprojection on its own (that is, it is not backed by actual data, but by a remote service that can perform reprojection for us).- See Also:
-
MULTICRS_READER
This property is present, and evaluates to "true", if the reader internally has multiple CRS elements, even if it advertises a single CRS in output (e.g., it won't perform a general reprojection for us, but generate and output in its declared CRS)- See Also:
-
MULTICRS_EPSGCODES
When the above MULTICRS_READER property is present and evaluates to "true", this property may contain the list of internal EPSG Codes of the multiple CRS, if the reader implements it.- See Also:
-
PAM_DATASET
The name of the property containing the eventual GDALPAMDataset
for the coverage at hand.- See Also:
-
-
Method Details
-
getOriginalEnvelope
GeneralBounds getOriginalEnvelope()Return the originalGeneralBounds
for the default coverage served by the underlying store.- Returns:
- the original
GeneralBounds
for the default coverage served by the underlying store.
-
getOriginalEnvelope
Return the originalGeneralBounds
for the specified coverageName.- Parameters:
coverageName
- the name of the coverage to work on.- Returns:
- the original
GeneralBounds
for the specified coverageName. - Throws:
NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not exist
-
getCoordinateReferenceSystem
CoordinateReferenceSystem getCoordinateReferenceSystem()Retrieves theCoordinateReferenceSystem
associated to the default coverage for thisGridCoverage2DReader
.- Returns:
- the
CoordinateReferenceSystem
mapped to the specified coverageName, ornull
if the provided coverageName does not map to a real coverage. - Throws:
NullPointerException
- if the specified coverageName isnull
-
getCoordinateReferenceSystem
Retrieves theCoordinateReferenceSystem
associated to thisGridCoverage2DReader
for the specified coverageName.- Returns:
- the
CoordinateReferenceSystem
mapped to the specified coverageName - Throws:
NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not exist
-
getOriginalGridRange
GridEnvelope getOriginalGridRange()Retrieves theGridEnvelope
associated to the default coverage for thisGridCoverage2DReader
.The
GridEnvelope
describes the raster area (in pixels) covered by the coverage.- Returns:
- the
CoordinateReferenceSystem
mapped to the default coverageName
-
getOriginalGridRange
Retrieves theGridEnvelope
associated to the specified coverageName for thisGridCoverage2DReader
.The
GridEnvelope
describes the raster area (in pixels) covered by the coverage.- Parameters:
coverageName
- the name of the coverage to work with- Returns:
- the
GridEnvelope
mapped to the specified coverageName - Throws:
NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not exist
-
getOriginalGridToWorld
Retrieves theMathTransform
associated to the default coverage for thisGridCoverage2DReader
.- Returns:
- the
CoordinateReferenceSystem
mapped to the default coverageName
-
getOriginalGridToWorld
Retrieves theMathTransform
associated to the requested coverageName for thisGridCoverage2DReader
.- Parameters:
coverageName
- the name of the coverage to work with- Returns:
- the
MathTransform
mapped to the specified coverageName - Throws:
NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not exist
-
read
Created aGridCoverage2D
out of thisGridCoverage2DReader
for the default coverage.- Specified by:
read
in interfaceGridCoverageReader
- Parameters:
parameters
- an array ofGeneralParameterValue
that uses a subset of the available read params for thisGridCoverage2DReader
as specified by theFormat
- Returns:
- a
GridCoverage2D
for the underlying default coverage for thisGridCoverage2DReader
ornull
in case noGridCoverage2D
can be read for the provided parameters. - Throws:
IOException
- in case an error happen during read time.
-
read
Retrieves theGridEnvelope
associated to the specified coverageName for thisGridCoverage2DReader
.- Specified by:
read
in interfaceGridCoverageReader
- Parameters:
coverageName
- the name of the coverage to work withparameters
- an array ofGeneralParameterValue
that uses a subset of the available read params for thisGridCoverage2DReader
as specified by theFormat
- Returns:
- a
GridCoverage2D
for the underlying default coverage for thisGridCoverage2DReader
ornull
in case noGridCoverage2D
can be read for the provided parameters. - Throws:
NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not existIOException
- if a read operation failed for some other input/output reason, includingFileNotFoundException
if no file with the givenname
can be found, orIIOException
if an error was thrown by the underlying image library.
-
getDynamicParameters
Return theSet
of dynamic read parameters supported by thisGridCoverage2DReader
for the default coverage.- Returns:
- the
Set
of dynamic read parameters supported by thisGridCoverage2DReader
. - Throws:
IOException
- in case an error occurs while creating theSet
of dynamic parameters.
-
getDynamicParameters
Return theSet
of dynamic read parameters supported by thisGridCoverage2DReader
for the specified coverage.- Parameters:
coverageName
- the name of the coverage to work with- Returns:
- the
Set
of dynamic read parameters supported by thisGridCoverage2DReader
. - Throws:
IOException
- in case an error occurs while creating theSet
of dynamic parameters.NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not exist
-
getReadingResolutions
double[] getReadingResolutions(OverviewPolicy policy, double[] requestedResolution) throws IOException Return the resolution of the overview which would be picked out for the provided requested resolution using the providedOverviewPolicy
. This method works on the default coverage for thisGridCoverage2DReader
.- Parameters:
policy
- theOverviewPolicy
to use during evaluation.requestedResolution
- the requested resolution- Returns:
- an array of 2 double with the resolution of the selected overview.
- Throws:
IOException
- in case an error occurs.
-
getReadingResolutions
double[] getReadingResolutions(String coverageName, OverviewPolicy policy, double[] requestedResolution) throws IOException Return the resolution of the overview which would be picked out for the provided requested resolution using the providedOverviewPolicy
. This method works on the specified coverage for thisGridCoverage2DReader
.- Parameters:
coverageName
- the name of the coverage to work on.policy
- theOverviewPolicy
to use during evaluation.requestedResolution
- the requested resolution- Returns:
- an array of 2 double with the resolution of the selected overview.
- Throws:
IOException
- in case an error occurs.NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not exist
-
getDatasetLayout
DatasetLayout getDatasetLayout()Returns theDatasetLayout
for the coverage.- Returns:
- a
DatasetLayout
object containing info about Overview number and Image masks.
-
getDatasetLayout
Returns theDatasetLayout
for the specified coverage.- Parameters:
coverageName
- the name of the coverage for which we do want to get theDatasetLayout
- Returns:
- a
DatasetLayout
object containing info about Overview number and Image masks.
-
getImageLayout
Retrieve theImageLayout
for the default coverage.Throw an
IllegalArgumentException
in case the name is wrong and/or no such a coverage exists.- Returns:
- an
ImageLayout
that is useful for actually knowing theColorModel
, theSampleModel
as well as the tile grid for the default coverage. - Throws:
IOException
-
getImageLayout
Retrieve theImageLayout
for the specified coverage.Throw an
IllegalArgumentException
in case the name is wrong and/or no such a coverage exists.- Parameters:
coverageName
- the name of the coverage for which we want to know theGridEnvelope
.- Returns:
- an
ImageLayout
that is useful for actually knowing theColorModel
, theSampleModel
as well as the tile grid for a certain coverage. - Throws:
NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not existIOException
-
getResolutionLevels
Retrieve the resolution levels for the default coverage.Throw an
IllegalArgumentException
in case the name is wrong and/or no such a coverage exists.- Returns:
- the resolution levels for the default coverage.
- Throws:
NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not existIOException
-
getResolutionLevels
Retrieve the resolution levels for the specified coverage.Throw an
IllegalArgumentException
in case the name is wrong and/or no such a coverage exists.- Parameters:
coverageName
- the name of the coverage for which we want to know the resolution levels.- Returns:
- the resolution levels for the specified coverage.
- Throws:
NullPointerException
- if the specified coverageName isnull
IllegalArgumentException
- if the specified coverageName does not existIOException
-
getInfo
ServiceInfo getInfo()Information about the store.- Returns:
- ServiceInfo describing the whole store.
-
getInfo
Information about a specific resource.- Returns:
- ResourceInfo describing a specific coverage.
-