org.geotools.coverage.grid.io
Interface GridCoverage2DReader

All Superinterfaces:
GridCoverageReader
All Known Subinterfaces:
StructuredGridCoverage2DReader
All Known Implementing Classes:
AbstractGridCoverage2DReader, AIGReader, ArcGridReader, ArcSDEGridCoverage2DReaderJAI, BaseGDALGridCoverage2DReader, BaseGridCoverage2DReader, DTEDReader, ECWReader, EnviHdrReader, ErdasImgReader, EsriHdrReader, GeoPackageReader, GeoTiffReader, GrassCoverageReader, GTopo30Reader, IDRISIReader, ImageMosaicJDBCReader, ImageMosaicReader, ImagePyramidReader, JP2ECWReader, JP2KReader, JP2KReader, JP2MrSIDReader, MrSIDReader, NITFReader, RPFTOCReader, WorldImageReader

public interface GridCoverage2DReader
extends GridCoverageReader

Provides access to named GridCoverage2D (along with any context information) from a persistent store. 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
static String ELEVATION_DOMAIN
          Elevation domain (comma separated list of values)
static String ELEVATION_DOMAIN_MAXIMUM
          Elevation domain maximum value
static String ELEVATION_DOMAIN_MINIMUM
          Elevation domain minimum value
static String ELEVATION_DOMAIN_RESOLUTION
          Elevation domain resolution
static String 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.
static String HAS_ELEVATION_DOMAIN
          Whether the elevation is expressed as a full domain or min/max/resolution (true if domain list available)
static String HAS_TIME_DOMAIN
          If the time domain is available (or if a min/max/resolution approach has been chosen)
static String TIME_DOMAIN
          The time domain (comma separated list of values)
static String TIME_DOMAIN_MAXIMUM
          The time domain max value
static String TIME_DOMAIN_MINIMUM
          The time domain min value
static String TIME_DOMAIN_RESOLUTION
          Time domain resolution (when using min/max/resolution)
 
Method Summary
 CoordinateReferenceSystem getCoordinateReferenceSystem()
          Retrieves the CoordinateReferenceSystem associated to the default coverage for this GridCoverage2DReader.
 CoordinateReferenceSystem getCoordinateReferenceSystem(String coverageName)
          Retrieves the CoordinateReferenceSystem associated to this GridCoverage2DReader for the specified coverageName.
 Set<ParameterDescriptor<List>> getDynamicParameters()
          Return the Set of dynamic read parameters supported by this GridCoverage2DReader for the default coverage.
 Set<ParameterDescriptor<List>> getDynamicParameters(String coverageName)
          Return the Set of dynamic read parameters supported by this GridCoverage2DReader for the specified coverage.
 ImageLayout getImageLayout()
          Retrieve the ImageLayout for the default coverage.
 ImageLayout getImageLayout(String coverageName)
          Retrieve the ImageLayout for the specified coverage.
 int getNumOverviews()
          Number of predetermined overviews for the default coverage.
 int getNumOverviews(String coverageName)
          Number of predetermined overviews for the specified coverage.
 GeneralEnvelope getOriginalEnvelope()
          Return the original GeneralEnvelope for the default coverage served by the underlying store.
 GeneralEnvelope getOriginalEnvelope(String coverageName)
          Return the original GeneralEnvelope for the specified coverageName.
 GridEnvelope getOriginalGridRange()
          Retrieves the GridEnvelope associated to the default coverage for this GridCoverage2DReader.
 GridEnvelope getOriginalGridRange(String coverageName)
          Retrieves the GridEnvelope associated to the specified coverageName for this GridCoverage2DReader.
 MathTransform getOriginalGridToWorld(PixelInCell pixInCell)
          Retrieves the MathTransform associated to the default coverage for this GridCoverage2DReader.
 MathTransform getOriginalGridToWorld(String coverageName, PixelInCell pixInCell)
          Retrieves the MathTransform associated to the requested coverageName for this GridCoverage2DReader.
 double[] getReadingResolutions(OverviewPolicy policy, double[] requestedResolution)
          Return the resolution of the overview which would be picked out for the provided requested resolution using the provided OverviewPolicy.
 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 provided OverviewPolicy.
 double[][] getResolutionLevels()
          Retrieve the resolution levels for the default coverage.
 double[][] getResolutionLevels(String coverageName)
          Retrieve the resolution levels for the specified coverage.
 GridCoverage2D read(GeneralParameterValue[] parameters)
          Created a GridCoverage2D out of this GridCoverage2DReader for the default coverage.
 GridCoverage2D read(String coverageName, GeneralParameterValue[] parameters)
          Retrieves the GridEnvelope associated to the specified coverageName for this GridCoverage2DReader.
 
Methods inherited from interface GridCoverageReader
dispose, getCurrentSubname, getFormat, getGridCoverageCount, getGridCoverageNames, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getSource, hasMoreGridCoverages, listSubNames, skip
 

Field Detail

TIME_DOMAIN

static final String TIME_DOMAIN
The time domain (comma separated list of values)

See Also:
Constant Field Values

TIME_DOMAIN_RESOLUTION

static final String TIME_DOMAIN_RESOLUTION
Time domain resolution (when using min/max/resolution)

See Also:
Constant Field Values

HAS_TIME_DOMAIN

static final String HAS_TIME_DOMAIN
If the time domain is available (or if a min/max/resolution approach has been chosen)

See Also:
Constant Field Values

TIME_DOMAIN_MAXIMUM

static final String TIME_DOMAIN_MAXIMUM
The time domain max value

See Also:
Constant Field Values

TIME_DOMAIN_MINIMUM

static final String TIME_DOMAIN_MINIMUM
The time domain min value

See Also:
Constant Field Values

HAS_ELEVATION_DOMAIN

static final String HAS_ELEVATION_DOMAIN
Whether the elevation is expressed as a full domain or min/max/resolution (true if domain list available)

See Also:
Constant Field Values

ELEVATION_DOMAIN

static final String ELEVATION_DOMAIN
Elevation domain (comma separated list of values)

See Also:
Constant Field Values

ELEVATION_DOMAIN_MAXIMUM

static final String ELEVATION_DOMAIN_MAXIMUM
Elevation domain maximum value

See Also:
Constant Field Values

ELEVATION_DOMAIN_MINIMUM

static final String ELEVATION_DOMAIN_MINIMUM
Elevation domain minimum value

See Also:
Constant Field Values

ELEVATION_DOMAIN_RESOLUTION

static final String ELEVATION_DOMAIN_RESOLUTION
Elevation domain resolution

See Also:
Constant Field Values

FILE_SOURCE_PROPERTY

static final String 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:
Constant Field Values
Method Detail

getOriginalEnvelope

GeneralEnvelope getOriginalEnvelope()
Return the original GeneralEnvelope for the default coverage served by the underlying store.

Returns:
the original GeneralEnvelope for the default coverage served by the underlying store.

getOriginalEnvelope

GeneralEnvelope getOriginalEnvelope(String coverageName)
Return the original GeneralEnvelope for the specified coverageName.

Parameters:
coverageName - the name of the coverage to work on.
Returns:
the original GeneralEnvelope for the specified coverageName.
Throws:
NullPointerException - if the specified coverageName is null
IllegalArgumentException - if the specified coverageName does not exist

getCoordinateReferenceSystem

CoordinateReferenceSystem getCoordinateReferenceSystem()
Retrieves the CoordinateReferenceSystem associated to the default coverage for this GridCoverage2DReader.

Returns:
the CoordinateReferenceSystem mapped to the specified coverageName, or null if the provided coverageName does not map to a real coverage.
Throws:
NullPointerException - if the specified coverageName is null

getCoordinateReferenceSystem

CoordinateReferenceSystem getCoordinateReferenceSystem(String coverageName)
Retrieves the CoordinateReferenceSystem associated to this GridCoverage2DReader for the specified coverageName.

Returns:
the CoordinateReferenceSystem mapped to the specified coverageName
Throws:
NullPointerException - if the specified coverageName is null
IllegalArgumentException - if the specified coverageName does not exist

getOriginalGridRange

GridEnvelope getOriginalGridRange()
Retrieves the GridEnvelope associated to the default coverage for this GridCoverage2DReader.

The GridEnvelope describes the raster area (in pixels) covered by the coverage.

Returns:
the CoordinateReferenceSystem mapped to the default coverageName

getOriginalGridRange

GridEnvelope getOriginalGridRange(String coverageName)
Retrieves the GridEnvelope associated to the specified coverageName for this GridCoverage2DReader.

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 is null
IllegalArgumentException - if the specified coverageName does not exist

getOriginalGridToWorld

MathTransform getOriginalGridToWorld(PixelInCell pixInCell)
Retrieves the MathTransform associated to the default coverage for this GridCoverage2DReader.

Returns:
the CoordinateReferenceSystem mapped to the default coverageName

getOriginalGridToWorld

MathTransform getOriginalGridToWorld(String coverageName,
                                     PixelInCell pixInCell)
Retrieves the MathTransform associated to the requested coverageName for this GridCoverage2DReader.

Parameters:
coverageName - the name of the coverage to work with
Returns:
the MathTransform mapped to the specified coverageName
Throws:
NullPointerException - if the specified coverageName is null
IllegalArgumentException - if the specified coverageName does not exist

read

GridCoverage2D read(GeneralParameterValue[] parameters)
                    throws IOException
Created a GridCoverage2D out of this GridCoverage2DReader for the default coverage.

Specified by:
read in interface GridCoverageReader
Parameters:
parameters - an array of GeneralParameterValue that uses a subset of the available read params for this GridCoverage2DReader as specified by the Format
Returns:
a GridCoverage2D for the underlying default coverage for this GridCoverage2DReader or null in case no GridCoverage2D can be read for the provided parameters.
Throws:
IOException - in case an error happen during read time.

read

GridCoverage2D read(String coverageName,
                    GeneralParameterValue[] parameters)
                    throws IOException
Retrieves the GridEnvelope associated to the specified coverageName for this GridCoverage2DReader.

Specified by:
read in interface GridCoverageReader
Parameters:
coverageName - the name of the coverage to work with
parameters - an array of GeneralParameterValue that uses a subset of the available read params for this GridCoverage2DReader as specified by the Format
Returns:
a GridCoverage2D for the underlying default coverage for this GridCoverage2DReader or null in case no GridCoverage2D can be read for the provided parameters.
Throws:
NullPointerException - if the specified coverageName is null
IllegalArgumentException - if the specified coverageName does not exist
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.

getDynamicParameters

Set<ParameterDescriptor<List>> getDynamicParameters()
                                                    throws IOException
Return the Set of dynamic read parameters supported by this GridCoverage2DReader for the default coverage.

Returns:
the Set of dynamic read parameters supported by this GridCoverage2DReader.
Throws:
IOException - in case an error occurs while creating the Set of dynamic parameters.

getDynamicParameters

Set<ParameterDescriptor<List>> getDynamicParameters(String coverageName)
                                                    throws IOException
Return the Set of dynamic read parameters supported by this GridCoverage2DReader for the specified coverage.

Parameters:
coverageName - the name of the coverage to work with
Returns:
the Set of dynamic read parameters supported by this GridCoverage2DReader.
Throws:
IOException - in case an error occurs while creating the Set of dynamic parameters.
NullPointerException - if the specified coverageName is null
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 provided OverviewPolicy. This method works on the default coverage for this GridCoverage2DReader.

Parameters:
policy - the OverviewPolicy 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 provided OverviewPolicy. This method works on the specified coverage for this GridCoverage2DReader.

Parameters:
coverageName - the name of the coverage to work on.
policy - the OverviewPolicy 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 is null
IllegalArgumentException - if the specified coverageName does not exist

getNumOverviews

int getNumOverviews()
Number of predetermined overviews for the default coverage.

Returns:
The number of predetermined overviews for the default coverage. Zero if none are available, -1 if infinite are available, otherwise a positive number.

getNumOverviews

int getNumOverviews(String coverageName)
Number of predetermined overviews for the specified coverage.

Parameters:
coverageName - the name of the coverage for which we do want to get the number of overviews.
Returns:
The number of predetermined overviews for the specified coverage. 0 if none are available, -1 if infinite are available, otherwise a positive number.
Throws:
NullPointerException - if the specified coverageName is null
IllegalArgumentException - if the specified coverageName does not exist

getImageLayout

ImageLayout getImageLayout()
                           throws IOException
Retrieve the ImageLayout 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 the ColorModel, the SampleModel as well as the tile grid for the default coverage.
Throws:
IOException

getImageLayout

ImageLayout getImageLayout(String coverageName)
                           throws IOException
Retrieve the ImageLayout 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 GridEnvelope.
Returns:
an ImageLayout that is useful for actually knowing the ColorModel, the SampleModel as well as the tile grid for a certain coverage.
Throws:
NullPointerException - if the specified coverageName is null
IllegalArgumentException - if the specified coverageName does not exist
IOException

getResolutionLevels

double[][] getResolutionLevels()
                               throws IOException
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 is null
IllegalArgumentException - if the specified coverageName does not exist
IOException

getResolutionLevels

double[][] getResolutionLevels(String coverageName)
                               throws IOException
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 is null
IllegalArgumentException - if the specified coverageName does not exist
IOException


Copyright © 1996-2014 Geotools. All Rights Reserved.