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, sourceFields 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.intNumber of coverages for this reader is 1read(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, setReadParamsMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GridCoverage2DReader
getCoordinateReferenceSystem, getCoordinateReferenceSystem, getDatasetLayout, getDatasetLayout, getDynamicParameters, getDynamicParameters, getImageLayout, getImageLayout, getInfo, getInfo, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getReadingResolutions, getReadingResolutions, getResolutionLevels, getResolutionLevels, readMethods 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:GridCoverageReaderReturns the format handled by thisGridCoverageReader.- Specified by:
getFormatin interfaceGridCoverageReader- See Also:
-
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:
-
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:
-