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 aGridCoverage2Dfrom 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
Constructors Constructor Description ArcGridReader(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormatgetFormat()Returns the format handled by thisGridCoverageReader.intgetGridCoverageCount()Number of coverages for this reader is 1GridCoverage2Dread(GeneralParameterValue[] params)Reads aGridCoverage2Dpossibly 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 Detail
-
ArcGridReader
public ArcGridReader(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(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
-
-
Method Detail
-
getFormat
public Format getFormat()
Description copied from interface:GridCoverageReaderReturns the format handled by thisGridCoverageReader.- Specified by:
getFormatin interfaceGridCoverageReader- See Also:
GridCoverageReader.getFormat()
-
read
public GridCoverage2D read(GeneralParameterValue[] params) throws IllegalArgumentException, IOException
Reads aGridCoverage2Dpossibly 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
AbstractGridFormatclass andArcGridFormatclass.- Specified by:
readin interfaceGridCoverage2DReader- Specified by:
readin interfaceGridCoverageReader- Specified by:
readin classAbstractGridCoverage2DReader- Parameters:
params- an array ofGeneralParameterValuecontaining the parameters to control this read process.- Returns:
- a
GridCoverage2D. - Throws:
InvalidParameterNameException- if a parameter inparametersdoesn't have a recognized name.InvalidParameterValueException- if a parameter inparametersdoesn't have a valid value.ParameterNotFoundException- if a parameter was required for the operation but was not provided in theparameterslist.IOException- if a read operation failed for some other input/output reason, includingFileNotFoundExceptionif no file with the givennamecan be found, orIIOExceptionif an error was thrown by the underlying image library.IllegalArgumentException- See Also:
AbstractGridFormat,ArcGridFormat,GridCoverageReader.read(org.geotools.api.parameter.GeneralParameterValue[])
-
getGridCoverageCount
public int getGridCoverageCount()
Number of coverages for this reader is 1- Specified by:
getGridCoverageCountin interfaceGridCoverageReader- Overrides:
getGridCoverageCountin classAbstractGridCoverage2DReader- Returns:
- the number of coverages for this reader.
- See Also:
GridCoverageReader.getGridCoverageCount()
-
-