org.geotools.gce.arcgrid
Class ArcGridReader
java.lang.Object
org.geotools.coverage.grid.io.AbstractGridCoverage2DReader
org.geotools.gce.arcgrid.ArcGridReader
- All Implemented Interfaces:
- org.opengis.coverage.grid.GridCoverageReader
public final class ArcGridReader
- extends AbstractGridCoverage2DReader
- implements org.opengis.coverage.grid.GridCoverageReader
This class can read an arc grid data source (ArcGrid or GRASS ASCII) and
create a GridCoverage2D
from the data.
- Since:
- 2.3.x
- Author:
- Daniele Romagnoli, GeoSolutions, Simone Giannecchini, GeoSolutions
Fields inherited from class org.geotools.coverage.grid.io.AbstractGridCoverage2DReader |
closeMe, coverageFactory, coverageName, crs, demColors, EPS, gzipped, highestRes, hints, inStream, numOverviews, originalEnvelope, originalGridRange, overViewResolutions, raster2Model, source |
Constructor Summary |
ArcGridReader(java.lang.Object input)
Creates a new instance of an ArcGridReader basing the decision on whether
the file is compressed or not. |
ArcGridReader(java.lang.Object input,
Hints hints)
Creates a new instance of an ArcGridReader basing the decision on whether
the file is compressed or not. |
Methods inherited from class org.geotools.coverage.grid.io.AbstractGridCoverage2DReader |
createImageCoverage, createImageCoverage, decimationOnReadingControl, dispose, finalize, getCrs, getCurrentSubname, getInfo, getMetadataNames, getMetadataValue, getOriginalEnvelope, getOriginalGridRange, getOriginalGridToWorld, getResolution, getSource, hasMoreGridCoverages, listSubNames, setReadParams, skip |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opengis.coverage.grid.GridCoverageReader |
dispose, getCurrentSubname, getMetadataNames, getMetadataValue, getSource, hasMoreGridCoverages, listSubNames, skip |
ArcGridReader
public ArcGridReader(java.lang.Object input)
throws DataSourceException
- Creates a new instance of an ArcGridReader basing the decision on whether
the file is compressed or not. I assume nothing about file extension.
- Parameters:
input
- Source object for which we want to build an ArcGridReader.
- Throws:
DataSourceException
ArcGridReader
public ArcGridReader(java.lang.Object input,
Hints hints)
throws DataSourceException
- Creates a new instance of an ArcGridReader basing the decision on whether
the file is compressed or not. I assume nothing about file extension.
- Parameters:
input
- Source object for which we want to build an ArcGridReader.hints
- Hints to be used by this reader throughout his life.
- Throws:
DataSourceException
getFormat
public org.opengis.coverage.grid.Format getFormat()
- Specified by:
getFormat
in interface org.opengis.coverage.grid.GridCoverageReader
- See Also:
GridCoverageReader.getFormat()
read
public GridCoverage2D read(org.opengis.parameter.GeneralParameterValue[] params)
throws java.lang.IllegalArgumentException,
java.io.IOException
- Reads a
GridCoverage2D
possibly matching as close as possible the
resolution computed by using the input params provided by using the
parameters for this read(GeneralParameterValue[])
.
To have an idea about the possible read parameters take a look at
AbstractGridFormat
class and ArcGridFormat
class.
- Specified by:
read
in interface org.opengis.coverage.grid.GridCoverageReader
- Specified by:
read
in class AbstractGridCoverage2DReader
- Parameters:
params
- an array of GeneralParameterValue
containing the
parameters to control this read process.
- Returns:
- a
GridCoverage2D
.
- Throws:
java.io.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.
java.lang.IllegalArgumentException
- See Also:
AbstractGridFormat
,
ArcGridFormat
,
GridCoverageReader.read(org.opengis.parameter.GeneralParameterValue[])
getGridCoverageCount
public int getGridCoverageCount()
- Number of coverages for this reader is 1
- Overrides:
getGridCoverageCount
in class AbstractGridCoverage2DReader
- Returns:
- the number of coverages for this reader.
- See Also:
org.opengis.coverage.grid.GridCoverageReader#getGridCoverageCount()
Copyright © 1996-2010 Geotools. All Rights Reserved.