org.geotools.gce.arcgrid
Class ArcGridReader

Object
  extended by AbstractGridCoverage2DReader
      extended by ArcGridReader
All Implemented Interfaces:
GridCoverage2DReader, GridCoverageReader

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, gzipped, highestRes, hints, inStream, inStreamSPI, numOverviews, originalEnvelope, originalGridRange, overViewResolutions, raster2Model, 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, TIME_DOMAIN, TIME_DOMAIN_MAXIMUM, TIME_DOMAIN_MINIMUM, TIME_DOMAIN_RESOLUTION
 
Constructor Summary
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
 Format getFormat()
          Returns the format handled by this GridCoverageReader.
 int getGridCoverageCount()
          Number of coverages for this reader is 1
 GridCoverage2D read(GeneralParameterValue[] params)
          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[]).
 
Methods inherited from class AbstractGridCoverage2DReader
createImageCoverage, createImageCoverage, decimationOnReadingControl, dispose, finalize, getCoordinateReferenceSystem, getCoordinateReferenceSystem, getCrs, getCurrentSubname, getDynamicParameters, getDynamicParameters, getGridCoverageNames, getImageLayout, getImageLayout, getInfo, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getNumOverviews, getNumOverviews, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getOverviewGridEnvelope, getOverviewGridEnvelope, getReadingResolutions, getReadingResolutions, getResolution, getResolutionLevels, getResolutionLevels, getSource, hasMoreGridCoverages, listSubNames, read, setlayout, setLayout, setReadParams, skip
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface GridCoverage2DReader
getCoordinateReferenceSystem, getCoordinateReferenceSystem, getDynamicParameters, getDynamicParameters, getImageLayout, getImageLayout, getNumOverviews, getNumOverviews, getOriginalEnvelope, getOriginalEnvelope, getOriginalGridRange, getOriginalGridRange, getOriginalGridToWorld, getOriginalGridToWorld, getReadingResolutions, getReadingResolutions, getResolutionLevels, getResolutionLevels, read
 
Methods inherited from interface GridCoverageReader
dispose, getCurrentSubname, getGridCoverageNames, getMetadataNames, getMetadataNames, getMetadataValue, getMetadataValue, getSource, hasMoreGridCoverages, listSubNames, skip
 

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: GridCoverageReader
Returns the format handled by this GridCoverageReader.

Specified by:
getFormat in interface GridCoverageReader
See Also:
GridCoverageReader.getFormat()

read

public GridCoverage2D read(GeneralParameterValue[] params)
                    throws IllegalArgumentException,
                           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 GridCoverage2DReader
Specified by:
read in interface 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:
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.
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
See Also:
AbstractGridFormat, ArcGridFormat, GridCoverageReader.read(org.opengis.parameter.GeneralParameterValue[])

getGridCoverageCount

public int getGridCoverageCount()
Number of coverages for this reader is 1

Specified by:
getGridCoverageCount in interface GridCoverageReader
Overrides:
getGridCoverageCount in class AbstractGridCoverage2DReader
Returns:
the number of coverages for this reader.
See Also:
GridCoverageReader.getGridCoverageCount()


Copyright © 1996-2014 Geotools. All Rights Reserved.