public abstract class AbstractGridCoverage2DReader extends Object implements GridCoverage2DReader
The main drawback I see with the current GeoApi GridCoverageReader interface is that there is
no way to get real information about a raster source unless you instantiate a GridCoverage. As an
instance it is impossible to know the envelope, the number of overviews, the tile size. This
information is needed in order to perform decimation on reading or to use built-in overviews
This really impacts the ability to exploit raster datasets in a desktop environment where caching
is crucial.
Modifier and Type | Field and Description |
---|---|
protected boolean |
closeMe
Temp variable used in many readers.
|
protected GridCoverageFactory |
coverageFactory
GridCoverageFactory instance. |
protected String |
coverageName
Coverage name
|
protected CoordinateReferenceSystem |
crs
crs for this coverage
|
protected DatasetLayout |
dtLayout
Coverage
DatasetLayout containing information about Overviews and Mask management |
protected static double |
EPS
Small number used for double comparisons
|
protected boolean |
gzipped
In case we are trying to read from a GZipped file this will be set to true.
|
protected double[] |
highestRes
Highest resolution available for this reader.
|
protected Hints |
hints
Hints used by the
AbstractGridCoverage2DReader subclasses. |
protected ImageInputStream |
inStream
Input stream that can be used to initialize subclasses of
AbstractGridCoverage2DReader . |
protected ImageInputStreamSpi |
inStreamSPI |
protected int |
numOverviews
This contains the number of overviews.aaa
|
protected GeneralEnvelope |
originalEnvelope
Envelope read from file
|
protected GridEnvelope |
originalGridRange
The original
GridRange for the GridCoverage2D of this reader. |
protected double[][] |
overViewResolutions
Resolutions avialaible through an overviews based mechanism.
|
protected MathTransform |
raster2Model
2DGridToWorld math transform.
|
protected Object |
source
Source to read from
|
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 |
AbstractGridCoverage2DReader()
Default protected constructor.
|
|
AbstractGridCoverage2DReader(Object input)
Creates a new instance of a
AIGReader . |
|
AbstractGridCoverage2DReader(Object input,
Hints hints)
Creates a new instance of a
AIGReader . |
Modifier and Type | Method and Description |
---|---|
protected void |
addAllSiblings(File file,
List<File> files,
String... extensions)
Adds all the siblings that could be found to exist to the given file list
|
protected void |
addSiblings(List<File> files,
File... siblings)
Adds the specified siblings, if not null, and existing
|
protected boolean |
checkName(String coverageName)
This method is responsible for checking the provided coverage name against the coverage name
for this
GridCoverage2DReader . |
protected GridCoverage |
createImageCoverage(PlanarImage image)
Creates a
GridCoverage for the provided PlanarImage using the originalEnvelope that was provided for this coverage. |
protected GridCoverage2D |
createImageCoverage(PlanarImage image,
MathTransform raster2Model)
Creates a
GridCoverage for the provided PlanarImage using the raster2Model that was provided for this coverage. |
protected GridCoverage |
createImageCoverage(String coverageName,
PlanarImage image)
Creates a
GridCoverage for the provided PlanarImage using the originalEnvelope that was provided for this coverage. |
protected GridCoverage2D |
createImageCoverage(String coverageName,
PlanarImage image,
MathTransform raster2Model)
Creates a
GridCoverage for the provided PlanarImage using the raster2Model that was provided for this coverage. |
protected void |
decimationOnReadingControl(String coverageName,
Integer imageChoice,
ImageReadParam readP,
double[] requestedRes)
This method is responsible for evaluating possible subsampling factors once the best
resolution level has been found, in case we have support for overviews, or starting from the
original coverage in case there are no overviews available.
|
void |
dispose()
Disposes this reader.
|
protected void |
finalize()
Forcing disposal of this
AbstractGridCoverage2DReader which may keep an ImageInputStream open. |
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Retrieves the
GeneralEnvelope for this AbstractGridCoverage2DReader . |
CoordinateReferenceSystem |
getCoordinateReferenceSystem(String coverageName)
Retrieves the
GeneralEnvelope for this AbstractGridCoverage2DReader . |
CoordinateReferenceSystem |
getCrs()
Deprecated.
|
String |
getCurrentSubname()
Deprecated.
no replacement for that method
|
DatasetLayout |
getDatasetLayout()
Returns the
DatasetLayout for the coverage. |
DatasetLayout |
getDatasetLayout(String coverageName)
Returns the
DatasetLayout for the specified coverage. |
Set<ParameterDescriptor<List>> |
getDynamicParameters()
Return the set of dynamic parameterDescriptors (the ones related to domains) for this reader.
|
Set<ParameterDescriptor<List>> |
getDynamicParameters(String coverageName)
Return the set of dynamic parameterDescriptors (the ones related to domains) for this reader.
|
protected List<FileGroupProvider.FileGroup> |
getFiles()
Returns a list of files making up the source data for this reader (as a whole).
|
int |
getGridCoverageCount()
Retrieve the number of coverages contained within the input source.
|
String[] |
getGridCoverageNames()
Retrieve the list of coverages contained within the input source.
|
GroundControlPoints |
getGroundControlPoints()
Return the ground control points for the default coverage, or null if there are none
|
GroundControlPoints |
getGroundControlPoints(String coverageName)
Return the ground control points for the specified, or null if there are none
|
protected double[] |
getHighestRes(String coverageName) |
ImageLayout |
getImageLayout()
Retrieve the
ImageLayout for the default coverage. |
ImageLayout |
getImageLayout(String coverageName)
Retrieve the
ImageLayout for the specified coverage. |
ServiceInfo |
getInfo()
Information about this source.
|
ResourceInfo |
getInfo(String coverageName)
Default implementation returns a FileResourceInfo containing same fileGroup list contained in
the ServiceInfo object.
|
String[] |
getMetadataNames()
Returns the list of metadata keywords associated with the input
source as a whole (not associated with any particular grid coverage).
|
String[] |
getMetadataNames(String coverageName)
Returns the list of metadata keywords associated with a specific gridCoverage referred by
name.
|
String |
getMetadataValue(String name)
Retrieve the metadata value for a given metadata name.
|
String |
getMetadataValue(String coverageName,
String name)
Retrieve the metadata value for a given metadata name for a specified coverage.
|
protected MultiLevelROIProvider |
getMultiLevelROIProvider(String coverageName) |
int |
getNumOverviews()
Number of predetermined overviews for the default coverage.
|
int |
getNumOverviews(String coverageName)
Number of predetermined overviews for the specified coverage.
|
GeneralEnvelope |
getOriginalEnvelope()
Retrieves the
GeneralEnvelope for this AbstractGridCoverage2DReader . |
GeneralEnvelope |
getOriginalEnvelope(String coverageName)
Retrieves the
GeneralEnvelope for this AbstractGridCoverage2DReader . |
GridEnvelope |
getOriginalGridRange()
Retrieves the
GeneralGridEnvelope that represents the raster grid dimensions of the
highest resolution level in this dataset. |
GridEnvelope |
getOriginalGridRange(String coverageName)
Retrieves the
GeneralGridEnvelope that represents the raster grid dimensions of the
highest resolution level in this dataset. |
MathTransform |
getOriginalGridToWorld(PixelInCell pixInCell)
Retrieves the original grid to world transformation for this
AbstractGridCoverage2DReader . |
MathTransform |
getOriginalGridToWorld(String coverageName,
PixelInCell pixInCell)
Retrieves the original grid to world transformation for this
AbstractGridCoverage2DReader . |
GridEnvelope |
getOverviewGridEnvelope(int overviewIndex) |
GridEnvelope |
getOverviewGridEnvelope(String coverageName,
int overviewIndex) |
double[] |
getReadingResolutions(OverviewPolicy policy,
double[] requestedResolution)
Returns the actual resolution used to read the data given the specified target resolution and
the specified overview policy
|
double[] |
getReadingResolutions(String coverageName,
OverviewPolicy policy,
double[] requestedResolution)
Returns the actual resolution used to read the data given the specified target resolution and
the specified overview policy
|
protected AffineTransform |
getRescaledRasterToModel(RenderedImage coverageRaster)
Computes the raster to model of a rescaled output raster, based on the original transform and
output raster scaling factor
|
protected static double[] |
getResolution(GeneralEnvelope envelope,
Rectangle2D dim,
CoordinateReferenceSystem crs)
This method is responsible for computing the resolutions in for the provided grid geometry in
the provided crs.
|
double[][] |
getResolutionLevels()
Retrieve the resolution levels for the default coverage.
|
double[][] |
getResolutionLevels(String coverageName)
Retrieve the resolution levels for the specified coverage.
|
protected static File |
getSibling(File file,
String extension)
Retrieves the sibling of the specified file, if available, or null otherwise
|
Object |
getSource()
Retrieves the source for this
AbstractGridCoverage2DReader . |
protected File |
getSourceAsFile()
Returns the source as a File, if it can be converted to one, and it exists
|
boolean |
hasMoreGridCoverages()
Deprecated.
no replacement for that method
|
String[] |
listSubNames()
Deprecated.
|
abstract GridCoverage2D |
read(GeneralParameterValue[] parameters)
Read the current grid coverage from the stream.
|
GridCoverage2D |
read(String coverageName,
GeneralParameterValue[] parameters)
Retrieves the
GridEnvelope associated to the specified coverageName for this GridCoverage2DReader . |
protected void |
setlayout(ImageLayout layout)
Set the provided layout for this
GridCoverage2DReader - |
protected void |
setLayout(ImageReader reader)
Extract the ImageLayout from the provided reader for the first available image.
|
protected Integer |
setReadParams(OverviewPolicy overviewPolicy,
ImageReadParam readP,
GeneralEnvelope requestedEnvelope,
Rectangle requestedDim)
This method is responsible for preparing the read param for doing an
ImageReader.read(int, ImageReadParam) . |
protected Integer |
setReadParams(String coverageName,
OverviewPolicy overviewPolicy,
ImageReadParam readP,
GeneralEnvelope requestedEnvelope,
Rectangle requestedDim)
This method is responsible for preparing the read param for doing an
ImageReader.read(int, ImageReadParam) . |
void |
skip()
Deprecated.
no replacement for that method
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat
protected static double EPS
protected int numOverviews
protected MathTransform raster2Model
protected CoordinateReferenceSystem crs
protected GeneralEnvelope originalEnvelope
protected String coverageName
protected Object source
protected Hints hints
AbstractGridCoverage2DReader
subclasses.protected double[] highestRes
protected boolean closeMe
protected boolean gzipped
protected GridEnvelope originalGridRange
GridRange
for the GridCoverage2D
of this reader.protected ImageInputStream inStream
AbstractGridCoverage2DReader
.protected double[][] overViewResolutions
protected GridCoverageFactory coverageFactory
GridCoverageFactory
instance.protected ImageInputStreamSpi inStreamSPI
protected DatasetLayout dtLayout
DatasetLayout
containing information about Overviews and Mask managementprotected AbstractGridCoverage2DReader()
public AbstractGridCoverage2DReader(Object input) throws DataSourceException
AIGReader
. I assume nothing about file extension.input
- Source object for which we want to build an AIGReader
.DataSourceException
public AbstractGridCoverage2DReader(Object input, Hints hints) throws DataSourceException
AIGReader
. I assume nothing about file extension.input
- Source object for which we want to build an AIGReader
.hints
- Hints to be used by this reader throughout his life.DataSourceException
protected boolean checkName(String coverageName)
GridCoverage2DReader
.coverageName
- the coverage name to check.true
if this GridCoverage2DReader
contains the provided coverage
name, false
otherwise.public GridCoverage2D read(String coverageName, GeneralParameterValue[] parameters) throws IllegalArgumentException, IOException
GridCoverage2DReader
GridEnvelope
associated to the specified coverageName for this GridCoverage2DReader
.read
in interface GridCoverage2DReader
read
in interface GridCoverageReader
coverageName
- the name of the coverage to work withparameters
- an array of GeneralParameterValue
that uses a subset of the
available read params for this GridCoverage2DReader
as specified by the Format
GridCoverage2D
for the underlying default coverage for this GridCoverage2DReader
or null
in case no GridCoverage2D
can be read
for the provided parameters.IllegalArgumentException
- if the specified coverageName does not existIOException
- 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.public abstract GridCoverage2D read(GeneralParameterValue[] parameters) throws IllegalArgumentException, IOException
Example:
The method hasMoreGridCoverages()
should be invoked first in order to verify that a
coverage is available.read
in interface GridCoverage2DReader
read
in interface GridCoverageReader
parameters
- Optional parameters matching Format.getReadParameters()
.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.CannotCreateGridCoverageException
- if the coverage can't be created for a logical
reason (for example an unsupported format, or an inconsistency found in the data).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 Integer setReadParams(OverviewPolicy overviewPolicy, ImageReadParam readP, GeneralEnvelope requestedEnvelope, Rectangle requestedDim) throws IOException, TransformException
ImageReader.read(int, ImageReadParam)
.
This method is responsible for preparing the read param for doing an ImageReader.read(int, ImageReadParam)
. It sets the passed ImageReadParam
in terms of
decimation on reading using the provided requestedEnvelope and requestedDim to evaluate the
needed resolution. It also returns and Integer
representing the index of the raster
to be read when dealing with multipage raster.
overviewPolicy
- it can be one of Hints#VALUE_OVERVIEW_POLICY_IGNORE
, Hints#VALUE_OVERVIEW_POLICY_NEAREST
, Hints#VALUE_OVERVIEW_POLICY_QUALITY
or
Hints#VALUE_OVERVIEW_POLICY_SPEED
. It specifies the policy to compute the
overviews level upon request.readP
- an instance of ImageReadParam
for setting the subsampling factors.requestedEnvelope
- the GeneralEnvelope
we are requesting.requestedDim
- the requested dimensions.IOException
TransformException
protected Integer setReadParams(String coverageName, OverviewPolicy overviewPolicy, ImageReadParam readP, GeneralEnvelope requestedEnvelope, Rectangle requestedDim) throws IOException, TransformException
ImageReader.read(int, ImageReadParam)
.
This method is responsible for preparing the read param for doing an ImageReader.read(int, ImageReadParam)
. It sets the passed ImageReadParam
in terms of
decimation on reading using the provided requestedEnvelope and requestedDim to evaluate the
needed resolution. It also returns and Integer
representing the index of the raster
to be read when dealing with multipage raster.
overviewPolicy
- it can be one of Hints#VALUE_OVERVIEW_POLICY_IGNORE
, Hints#VALUE_OVERVIEW_POLICY_NEAREST
, Hints#VALUE_OVERVIEW_POLICY_QUALITY
or
Hints#VALUE_OVERVIEW_POLICY_SPEED
. It specifies the policy to compute the
overviews level upon request.readP
- an instance of ImageReadParam
for setting the subsampling factors.requestedEnvelope
- the GeneralEnvelope
we are requesting.requestedDim
- the requested dimensions.IOException
TransformException
public double[] getReadingResolutions(OverviewPolicy policy, double[] requestedResolution) throws IOException
getReadingResolutions
in interface GridCoverage2DReader
policy
- resolutions
- IOException
public double[] getReadingResolutions(String coverageName, OverviewPolicy policy, double[] requestedResolution) throws IOException
getReadingResolutions
in interface GridCoverage2DReader
policy
- resolutions
- IOException
- in case an error occurs.protected final void decimationOnReadingControl(String coverageName, Integer imageChoice, ImageReadParam readP, double[] requestedRes)
Anyhow this method should not be called directly but subclasses should make use of the setReadParams method instead in order to transparently look for overviews.
imageChoice
- readP
- requestedRes
- protected final GridCoverage createImageCoverage(PlanarImage image) throws IOException
GridCoverage
for the provided PlanarImage
using the originalEnvelope
that was provided for this coverage.image
- contains the data for the coverage to create.GridCoverage
IOException
protected final GridCoverage createImageCoverage(String coverageName, PlanarImage image) throws IOException
GridCoverage
for the provided PlanarImage
using the originalEnvelope
that was provided for this coverage.coverageName
- image
- contains the data for the coverage to create.GridCoverage
IOException
protected final GridCoverage2D createImageCoverage(PlanarImage image, MathTransform raster2Model) throws IOException
GridCoverage
for the provided PlanarImage
using the raster2Model
that was provided for this coverage.
This method is vital when working with coverages that have a raster to model transformation that is not a simple scale and translate.
image
- contains the data for the coverage to create.raster2Model
- is the MathTransform
that maps from the raster space to the model
space.GridCoverage
IOException
protected final GridCoverage2D createImageCoverage(String coverageName, PlanarImage image, MathTransform raster2Model) throws IOException
GridCoverage
for the provided PlanarImage
using the raster2Model
that was provided for this coverage.
This method is vital when working with coverages that have a raster to model transformation that is not a simple scale and translate.
coverageName
- image
- contains the data for the coverage to create.raster2Model
- is the MathTransform
that maps from the raster space to the model
space.GridCoverage
IOException
protected static final double[] getResolution(GeneralEnvelope envelope, Rectangle2D dim, CoordinateReferenceSystem crs) throws DataSourceException
It is worth to note that the returned resolution array is of length of 2 and it always is
lon, lat for the moment.
It might be worth to remove the axes reordering code when we are confident enough with the
code to handle the north-up crs.
TODO use orthodromic distance?
envelope
- the GeneralEnvelopedim
- crs
- DataSourceException
public final CoordinateReferenceSystem getCrs()
getCoordinateReferenceSystem()
CoordinateReferenceSystem
for dataset pointed by this AbstractGridCoverage2DReader
.CoordinateReferenceSystem
for dataset pointed by this AbstractGridCoverage2DReader
.public GridEnvelope getOriginalGridRange()
GeneralGridEnvelope
that represents the raster grid dimensions of the
highest resolution level in this dataset.getOriginalGridRange
in interface GridCoverage2DReader
GeneralGridEnvelope
that represents the raster grid dimensions of the
highest resolution level in this dataset.public GridEnvelope getOriginalGridRange(String coverageName)
GeneralGridEnvelope
that represents the raster grid dimensions of the
highest resolution level in this dataset.getOriginalGridRange
in interface GridCoverage2DReader
coverageName
- the name of the coverage to work withGeneralGridEnvelope
that represents the raster grid dimensions of the
highest resolution level in this dataset.public CoordinateReferenceSystem getCoordinateReferenceSystem()
GeneralEnvelope
for this AbstractGridCoverage2DReader
.getCoordinateReferenceSystem
in interface GridCoverage2DReader
GeneralEnvelope
for this AbstractGridCoverage2DReader
.public CoordinateReferenceSystem getCoordinateReferenceSystem(String coverageName)
GeneralEnvelope
for this AbstractGridCoverage2DReader
.getCoordinateReferenceSystem
in interface GridCoverage2DReader
GeneralEnvelope
for this AbstractGridCoverage2DReader
.public GeneralEnvelope getOriginalEnvelope()
GeneralEnvelope
for this AbstractGridCoverage2DReader
.getOriginalEnvelope
in interface GridCoverage2DReader
GeneralEnvelope
for this AbstractGridCoverage2DReader
.public GeneralEnvelope getOriginalEnvelope(String coverageName)
GeneralEnvelope
for this AbstractGridCoverage2DReader
.getOriginalEnvelope
in interface GridCoverage2DReader
coverageName
- the name of the coverage to work on.GeneralEnvelope
for this AbstractGridCoverage2DReader
.public MathTransform getOriginalGridToWorld(PixelInCell pixInCell)
AbstractGridCoverage2DReader
.getOriginalGridToWorld
in interface GridCoverage2DReader
pixInCell
- specifies the datum of the transformation we want.AbstractGridCoverage2DReader
.public MathTransform getOriginalGridToWorld(String coverageName, PixelInCell pixInCell)
AbstractGridCoverage2DReader
.getOriginalGridToWorld
in interface GridCoverage2DReader
pixInCell
- specifies the datum of the transformation we want.coverageName
- the name of the coverage to work withAbstractGridCoverage2DReader
.public final Object getSource()
AbstractGridCoverage2DReader
.getSource
in interface GridCoverageReader
AbstractGridCoverage2DReader
.public void dispose()
This method just tries to close the underlying ImageInputStream
.
dispose
in interface GridCoverageReader
public void skip()
GridCoverageReader
skip
in interface GridCoverageReader
GridCoverageReader.skip()
public boolean hasMoreGridCoverages()
GridCoverageReader
true
if there is at least one more grid coverage available on the stream.hasMoreGridCoverages
in interface GridCoverageReader
GridCoverageReader.hasMoreGridCoverages()
public String[] listSubNames()
getGridCoverageNames()
GridCoverageReader
listSubNames
in interface GridCoverageReader
public String[] getGridCoverageNames()
GridCoverageReader
getGridCoverageNames
in interface GridCoverageReader
public String getCurrentSubname()
GridCoverageReader
getCurrentSubname
in interface GridCoverageReader
GridCoverageReader.getCurrentSubname()
public String[] getMetadataNames(String coverageName)
GridCoverageReader
getMetadataNames
in interface GridCoverageReader
public String[] getMetadataNames()
GridCoverageReader
getMetadataNames
in interface GridCoverageReader
GridCoverageReader.getMetadataNames()
public String getMetadataValue(String name)
GridCoverageReader
getMetadataValue
in interface GridCoverageReader
name
- Metadata keyword for which to retrieve metadata.GridCoverageReader.getMetadataNames()
.GridCoverageReader.getMetadataValue(java.lang.String)
public String getMetadataValue(String coverageName, String name)
GridCoverageReader
getMetadataValue
in interface GridCoverageReader
name
- Metadata keyword for which to retrieve metadata.GridCoverageReader.getMetadataNames()
.public int getGridCoverageCount()
GridCoverageReader
getGridCoverageCount
in interface GridCoverageReader
GridCoverageReader.getGridCoverageCount()
public ServiceInfo getInfo()
Subclasses should provide additional format specific information.
getInfo
in interface GridCoverage2DReader
protected List<FileGroupProvider.FileGroup> getFiles() throws IOException
IOException
protected File getSourceAsFile()
public ResourceInfo getInfo(String coverageName)
getInfo
in interface GridCoverage2DReader
coverageName
- protected void finalize() throws Throwable
AbstractGridCoverage2DReader
which may keep an ImageInputStream
open.public Set<ParameterDescriptor<List>> getDynamicParameters() throws IOException
getDynamicParameters
in interface GridCoverage2DReader
IOException
- in case an error occurs while creating the Set
of dynamic
parameters.public Set<ParameterDescriptor<List>> getDynamicParameters(String coverageName) throws IOException
getDynamicParameters
in interface GridCoverage2DReader
coverageName
- the name of the coverage to work withIOException
- in case an error occurs while creating the Set
of dynamic
parameters.public int getNumOverviews(String coverageName)
GridCoverage2DReader
getNumOverviews
in interface GridCoverage2DReader
coverageName
- the name of the coverage for which we do want to get the number of
overviews.public int getNumOverviews()
GridCoverage2DReader
getNumOverviews
in interface GridCoverage2DReader
public DatasetLayout getDatasetLayout()
GridCoverage2DReader
DatasetLayout
for the coverage.getDatasetLayout
in interface GridCoverage2DReader
DatasetLayout
object containing info about Overview number and Image masks.public DatasetLayout getDatasetLayout(String coverageName)
GridCoverage2DReader
DatasetLayout
for the specified coverage.getDatasetLayout
in interface GridCoverage2DReader
coverageName
- the name of the coverage for which we do want to get the DatasetLayout
DatasetLayout
object containing info about Overview number and Image masks.public GridEnvelope getOverviewGridEnvelope(int overviewIndex) throws IOException
IOException
public GridEnvelope getOverviewGridEnvelope(String coverageName, int overviewIndex) throws IOException
IOException
public ImageLayout getImageLayout(String coverageName) throws IOException
GridCoverage2DReader
ImageLayout
for the specified coverage.
Throw an IllegalArgumentException
in case the name is wrong and/or no such a
coverage exists.
getImageLayout
in interface GridCoverage2DReader
coverageName
- the name of the coverage for which we want to know the GridEnvelope
.ImageLayout
that is useful for actually knowing the ColorModel
,
the SampleModel
as well as the tile grid for a certain coverage.IOException
public ImageLayout getImageLayout() throws IOException
GridCoverage2DReader
ImageLayout
for the default coverage.
Throw an IllegalArgumentException
in case the name is wrong and/or no such a
coverage exists.
getImageLayout
in interface GridCoverage2DReader
ImageLayout
that is useful for actually knowing the ColorModel
,
the SampleModel
as well as the tile grid for the default coverage.IOException
protected void setLayout(ImageReader reader) throws IOException
reader
- an istance of ImageReader
IOException
- in case an error occursprotected void setlayout(ImageLayout layout)
GridCoverage2DReader
-layout
- the ImageLayout
to set. It must be nont nullpublic double[][] getResolutionLevels() throws IOException
GridCoverage2DReader
Throw an IllegalArgumentException
in case the name is wrong and/or no such a
coverage exists.
getResolutionLevels
in interface GridCoverage2DReader
IOException
public double[][] getResolutionLevels(String coverageName) throws IOException
GridCoverage2DReader
Throw an IllegalArgumentException
in case the name is wrong and/or no such a
coverage exists.
getResolutionLevels
in interface GridCoverage2DReader
coverageName
- the name of the coverage for which we want to know the resolution levels.IOException
protected double[] getHighestRes(String coverageName)
public GroundControlPoints getGroundControlPoints()
public GroundControlPoints getGroundControlPoints(String coverageName)
protected AffineTransform getRescaledRasterToModel(RenderedImage coverageRaster)
coverageRaster
- protected static File getSibling(File file, String extension)
file
- extension
- protected void addAllSiblings(File file, List<File> files, String... extensions)
file
- extension
- protected void addSiblings(List<File> files, File... siblings)
files
- siblings
- protected MultiLevelROIProvider getMultiLevelROIProvider(String coverageName)
Copyright © 1996–2019 Geotools. All rights reserved.