org.geotools.gce.arcgrid
Class ArcGridReader

java.lang.Object
  extended byorg.geotools.gce.arcgrid.ArcGridReader
All Implemented Interfaces:
org.opengis.coverage.grid.GridCoverageReader

public class ArcGridReader
extends java.lang.Object
implements org.opengis.coverage.grid.GridCoverageReader

This class can read an arc grid data source and create a grid coverage from the data.

Author:
jeichar, Simone Giannecchini

Constructor Summary
ArcGridReader(java.lang.Object aSource)
          Creates a new instance of an ArcGridReader.
 
Method Summary
 void dispose()
           
 java.lang.String getCurrentSubname()
           
 org.opengis.coverage.grid.Format getFormat()
           
 int getGridCoverageCount()
           
 java.lang.String[] getMetadataNames()
           
 java.lang.String getMetadataValue(java.lang.String name)
           
 java.lang.Object getSource()
           
 boolean hasMoreGridCoverages()
           
 java.lang.String[] listSubNames()
           
 ArcGridRaster openArcGridRaster()
          Returns the ArcGridRaster read by the datasource.
 org.opengis.coverage.grid.GridCoverage read(org.opengis.parameter.GeneralParameterValue[] params)
          Note: The geotools GridCoverage does not implement the geoapi GridCoverage Interface so this method shows an error.
 void skip()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcGridReader

public ArcGridReader(java.lang.Object aSource)
Creates a new instance of an 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:
aSource - Source object for which we wnat to build an ArcGridReader.
Method Detail

getMetadataNames

public java.lang.String[] getMetadataNames()
                                    throws java.io.IOException
Specified by:
getMetadataNames in interface org.opengis.coverage.grid.GridCoverageReader
Throws:
java.io.IOException
See Also:
GridCoverageReader.getMetadataNames()

getMetadataValue

public java.lang.String getMetadataValue(java.lang.String name)
                                  throws java.io.IOException,
                                         org.opengis.coverage.MetadataNameNotFoundException
Specified by:
getMetadataValue in interface org.opengis.coverage.grid.GridCoverageReader
Throws:
java.io.IOException
org.opengis.coverage.MetadataNameNotFoundException
See Also:
GridCoverageReader.getMetadataValue(java.lang.String)

listSubNames

public java.lang.String[] listSubNames()
                                throws java.io.IOException
Specified by:
listSubNames in interface org.opengis.coverage.grid.GridCoverageReader
Throws:
java.io.IOException
See Also:
GridCoverageReader.listSubNames()

getFormat

public org.opengis.coverage.grid.Format getFormat()
Specified by:
getFormat in interface org.opengis.coverage.grid.GridCoverageReader
See Also:
GridCoverageReader.getFormat()

getSource

public java.lang.Object getSource()
Specified by:
getSource in interface org.opengis.coverage.grid.GridCoverageReader
See Also:
GridCoverageReader.getSource()

getCurrentSubname

public java.lang.String getCurrentSubname()
                                   throws java.io.IOException
Specified by:
getCurrentSubname in interface org.opengis.coverage.grid.GridCoverageReader
Throws:
java.io.IOException
See Also:
GridCoverageReader.getCurrentSubname()

read

public org.opengis.coverage.grid.GridCoverage read(org.opengis.parameter.GeneralParameterValue[] params)
                                            throws java.lang.IllegalArgumentException,
                                                   java.io.IOException
Note: The geotools GridCoverage does not implement the geoapi GridCoverage Interface so this method shows an error. All other methods are using the geotools GridCoverage class

Specified by:
read in interface org.opengis.coverage.grid.GridCoverageReader
Throws:
java.lang.IllegalArgumentException
java.io.IOException
See Also:
GridCoverageReader.read(org.opengis.parameter.GeneralParameterValue[])

dispose

public void dispose()
             throws java.io.IOException
Specified by:
dispose in interface org.opengis.coverage.grid.GridCoverageReader
Throws:
java.io.IOException
See Also:
GridCoverageReader.dispose()

getGridCoverageCount

public int getGridCoverageCount()
See Also:
org.opengis.coverage.grid.GridCoverageReader#getGridCoverageCount()

openArcGridRaster

public ArcGridRaster openArcGridRaster()
                                throws java.io.IOException
Returns the ArcGridRaster read by the datasource. Use it only for specific needs, it's not a datasource independent method.

Returns:
the ArcGridRaster read by the datasource
Throws:
java.io.IOException - Thrown in the case of an unexpected exception
DataSourceException - DOCUMENT ME!

hasMoreGridCoverages

public boolean hasMoreGridCoverages()
                             throws java.io.IOException
Specified by:
hasMoreGridCoverages in interface org.opengis.coverage.grid.GridCoverageReader
Throws:
java.io.IOException

skip

public void skip()
          throws java.io.IOException
Specified by:
skip in interface org.opengis.coverage.grid.GridCoverageReader
Throws:
java.io.IOException


Copyright © GeoTools. All Rights Reserved.