Package org.geotools.gce.arcgrid
Class ArcGridWriter
- Object
-
- AbstractGridCoverageWriter
-
- ArcGridWriter
-
- All Implemented Interfaces:
GridCoverageWriter
public final class ArcGridWriter extends AbstractGridCoverageWriter implements GridCoverageWriter
ArcGridWriter
supports writing of an ArcGrid GridCoverage to a Desination objectXXX We cannot write a rotated grid coverage, we have to enforce that!
- Author:
- Daniele Romagnoli, Simone Giannecchini (simboss)
-
-
Field Summary
-
Fields inherited from class AbstractGridCoverageWriter
destination, hints, outStream
-
-
Constructor Summary
Constructors Constructor Description ArcGridWriter(Object destination)
Takes either a URL or a String that points to an ArcGridCoverage file and converts it to a URL that can then be written to.ArcGridWriter(Object destination, Hints hints)
Takes either a URL or a String that points to an ArcGridCoverage file and converts it to a URL that can then be written to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Releases resources held by thisAbstractGridCoverageWriter
.Format
getFormat()
Creates a Format object describing the Arc Grid Formatvoid
write(GridCoverage coverage, GeneralParameterValue[] parameters)
Note: The geotools GridCoverage class does not implement the geoAPI GridCoverage Interface so this method shows an error.-
Methods inherited from class AbstractGridCoverageWriter
finalize, getDestination, getMetadataNames, setCurrentSubname, setMetadataValue
-
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface GridCoverageWriter
getDestination, getMetadataNames, setCurrentSubname, setMetadataValue
-
-
-
-
Constructor Detail
-
ArcGridWriter
public ArcGridWriter(Object destination) throws DataSourceException
Takes either a URL or a String that points to an ArcGridCoverage file and converts it to a URL that can then be written to.- Parameters:
destination
- the URL or String pointing to the file to load the ArcGrid- Throws:
DataSourceException
-
ArcGridWriter
public ArcGridWriter(Object destination, Hints hints) throws DataSourceException
Takes either a URL or a String that points to an ArcGridCoverage file and converts it to a URL that can then be written to.- Parameters:
destination
- the URL or String pointing to the file to load the ArcGrid- Throws:
DataSourceException
-
-
Method Detail
-
getFormat
public Format getFormat()
Creates a Format object describing the Arc Grid Format- Specified by:
getFormat
in interfaceGridCoverageWriter
- Returns:
- the format of the data source we will write to. (ArcGridFormat in this case)
- See Also:
GridCoverageWriter.getFormat()
-
write
public void write(GridCoverage coverage, GeneralParameterValue[] parameters) throws IllegalArgumentException, IOException
Note: The geotools GridCoverage class does not implement the geoAPI GridCoverage Interface so this method shows an error. All other methods are using the geotools GridCoverage class- Specified by:
write
in interfaceGridCoverageWriter
- Parameters:
coverage
- The grid coverage to write.parameters
- An optional set of parameters. Should be any or all of the parameters returned byFormat.getWriteParameters()
.- 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 the export failed for some other input/output reason, includingIIOException
if an error was thrown by the underlying image library.IllegalArgumentException
- See Also:
GridCoverageWriter.write(org.geotools.api.coverage.grid.GridCoverage, org.geotools.api.parameter.GeneralParameterValue[])
-
dispose
public void dispose()
Description copied from class:AbstractGridCoverageWriter
Releases resources held by thisAbstractGridCoverageWriter
.- Specified by:
dispose
in interfaceGridCoverageWriter
- Overrides:
dispose
in classAbstractGridCoverageWriter
- See Also:
GridCoverageWriter.dispose()
-
-