org.geotools.gce.grassraster
Class GrassCoverageWriter

Object
  extended by AbstractGridCoverageWriter
      extended by GrassCoverageWriter
All Implemented Interfaces:
GridCoverageWriter

public class GrassCoverageWriter
extends AbstractGridCoverageWriter
implements GridCoverageWriter

Coverage Writer class for writing GRASS raster maps.

The class writes a GRASS raster map to a GRASS workspace (see package documentation for further info). The writing is really done via Imageio extended classes.

Since:
3.0
Author:
Andrea Antonello (www.hydrologis.com)
See Also:
GrassBinaryImageWriter, GrassBinaryRasterWriteHandler

Field Summary
 
Fields inherited from class AbstractGridCoverageWriter
destination, hints, outStream
 
Constructor Summary
GrassCoverageWriter(Object output)
          Constructor for the GrassCoverageWriter.
 
Method Summary
 Format getFormat()
          Returns the format handled by this GridCoverageWriter.
 void setProgressListener(ProgressListener monitor)
           
 void write(GridCoverage coverage, GeneralParameterValue[] parameters)
          Writes the specified grid coverage.
 void writeRaster(GridCoverage2D gridCoverage2D)
          Writes the supplied coverage to disk.
 void writeRaster(GridCoverage2D gridCoverage2D, GeneralParameterValue[] params)
           
 
Methods inherited from class AbstractGridCoverageWriter
dispose, 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
dispose, getDestination, getMetadataNames, setCurrentSubname, setMetadataValue
 

Constructor Detail

GrassCoverageWriter

public GrassCoverageWriter(Object output)
Constructor for the GrassCoverageWriter.

Method Detail

setProgressListener

public void setProgressListener(ProgressListener monitor)

writeRaster

public void writeRaster(GridCoverage2D gridCoverage2D)
                 throws IOException
Writes the supplied coverage to disk.

Note that this also takes care to cloes the file handle after writing to disk.

Parameters:
gridCoverage2D - the coverage to write.
Throws:
IOException

writeRaster

public void writeRaster(GridCoverage2D gridCoverage2D,
                        GeneralParameterValue[] params)
                 throws IOException
Throws:
IOException

getFormat

public Format getFormat()
Description copied from interface: GridCoverageWriter
Returns the format handled by this GridCoverageWriter.

Specified by:
getFormat in interface GridCoverageWriter

write

public void write(GridCoverage coverage,
                  GeneralParameterValue[] parameters)
           throws IllegalArgumentException,
                  IOException
Description copied from interface: GridCoverageWriter
Writes the specified grid coverage.

Specified by:
write in interface GridCoverageWriter
Parameters:
coverage - The grid coverage to write.
parameters - An optional set of parameters. Should be any or all of the parameters returned by Format.getWriteParameters().
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 the export failed for some other input/output reason, including IIOException if an error was thrown by the underlying image library.
IllegalArgumentException


Copyright © 1996-2014 Geotools. All Rights Reserved.