Package org.geotools.gce.arcgrid
Class ArcGridReader
Object
AbstractGridCoverage2DReader
ArcGridReader
- All Implemented Interfaces:
GridCoverageReader
,GridCoverage2DReader
public final class ArcGridReader
extends AbstractGridCoverage2DReader
implements GridCoverage2DReader
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
-
Field Summary
Fields inherited from class AbstractGridCoverage2DReader
closeMe, coverageFactory, coverageName, crs, dtLayout, EPS, gzipped, highestRes, hints, inStream, inStreamSPI, numOverviews, offsets, originalEnvelope, originalGridRange, overViewResolutions, raster2Model, scales, source
Fields inherited from interface GridCoverage2DReader
ELEVATION_DOMAIN, ELEVATION_DOMAIN_MAXIMUM, ELEVATION_DOMAIN_MINIMUM, ELEVATION_DOMAIN_RESOLUTION, FILE_SOURCE_PROPERTY, HAS_ELEVATION_DOMAIN, HAS_TIME_DOMAIN, MULTICRS_EPSGCODES, MULTICRS_READER, PAM_DATASET, REPROJECTING_READER, SOURCE_URL_PROPERTY, TIME_DOMAIN, TIME_DOMAIN_MAXIMUM, TIME_DOMAIN_MINIMUM, TIME_DOMAIN_RESOLUTION
-
Constructor Summary
ConstructorsConstructorDescriptionArcGridReader
(Object input) Creates a new instance of an ArcGridReader basing the decision on whether the file is compressed or not.ArcGridReader
(Object input, Hints hints) Creates a new instance of an ArcGridReader basing the decision on whether the file is compressed or not. -
Method Summary
Modifier and TypeMethodDescriptionReturns the format handled by thisGridCoverageReader
.int
Number of coverages for this reader is 1read
(GeneralParameterValue... params) Reads aGridCoverage2D
possibly matching as close as possible the resolution computed by using the input params provided by using the parameters for thisread(GeneralParameterValue[])
.Methods inherited from class AbstractGridCoverage2DReader
addAllSiblings, addSiblings, checkName, collectScaleOffset, createImageCoverage, createImageCoverage, createImageCoverage, createImageCoverage, decimationOnReadingControl, dispose, finalize, getCoordinateReferenceSystem, getCoordinateReferenceSystem, getDatasetLayout, getDatasetLayout, getDynamicParameters, getDynamicParameters, getFiles, getGridCoverageNames, getGroundControlPoints, getGroundControlPoints, getHighestRes, getHighestRes, getImageLayout, getImageLayout, getInfo, getInfo, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getMultiLevelROIProvider, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getOverviewGridEnvelope, getOverviewGridEnvelope, getPamDataset, getPamDataset, getReadingResolutions, getReadingResolutions, getRescaledRasterToModel, getResolution, getResolutionLevels, getResolutionLevels, getSibling, getSource, getSourceAsFile, read, setlayout, setLayout, setReadParams, setReadParams
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface GridCoverage2DReader
getCoordinateReferenceSystem, getCoordinateReferenceSystem, getDatasetLayout, getDatasetLayout, getDynamicParameters, getDynamicParameters, getImageLayout, getImageLayout, getInfo, getInfo, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getReadingResolutions, getReadingResolutions, getResolutionLevels, getResolutionLevels, read
Methods inherited from interface GridCoverageReader
dispose, getGridCoverageNames, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getSource
-
Constructor Details
-
ArcGridReader
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
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
-
-
Method Details
-
getFormat
Description copied from interface:GridCoverageReader
Returns the format handled by thisGridCoverageReader
.- Specified by:
getFormat
in interfaceGridCoverageReader
- See Also:
-
read
public GridCoverage2D read(GeneralParameterValue... params) throws IllegalArgumentException, IOException Reads aGridCoverage2D
possibly matching as close as possible the resolution computed by using the input params provided by using the parameters for thisread(GeneralParameterValue[])
.To have an idea about the possible read parameters take a look at
AbstractGridFormat
class andArcGridFormat
class.- Specified by:
read
in interfaceGridCoverage2DReader
- Specified by:
read
in interfaceGridCoverageReader
- Specified by:
read
in classAbstractGridCoverage2DReader
- Parameters:
params
- an array ofGeneralParameterValue
containing the parameters to control this read process.- Returns:
- a
GridCoverage2D
. - Throws:
InvalidParameterNameException
- if a parameter inparameters
doesn't have a recognized name.InvalidParameterValueException
- if a parameter inparameters
doesn't have a valid value.ParameterNotFoundException
- if a parameter was required for the operation but was not provided in theparameters
list.IOException
- 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.IllegalArgumentException
- See Also:
-
getGridCoverageCount
public int getGridCoverageCount()Number of coverages for this reader is 1- Specified by:
getGridCoverageCount
in interfaceGridCoverageReader
- Overrides:
getGridCoverageCount
in classAbstractGridCoverage2DReader
- Returns:
- the number of coverages for this reader.
- See Also:
-