Package org.geotools.gce.image
Class WorldImageWriter
Object
AbstractGridCoverageWriter
WorldImageWriter
- All Implemented Interfaces:
GridCoverageWriter
public final class WorldImageWriter
extends AbstractGridCoverageWriter
implements GridCoverageWriter
Writes a GridCoverage to a raster image file and an accompanying world file. The destination specified must point to
the location of the raster file to write to, as this is how the format is determined. The directory that file is
located in must also already exist.
- Author:
- Simone Giannecchini, GeoSolutions, rgould, Alessio Fabiani, GeoSolutions
-
Field Summary
Fields inherited from class AbstractGridCoverageWriter
destination, hints, outStream
-
Constructor Summary
ConstructorsConstructorDescriptionWorldImageWriter
(Object destination) Destination must be a File.WorldImageWriter
(Object destination, Hints hints) Destination must be a File. -
Method Summary
Modifier and TypeMethodDescription(non-Javadoc)void
write
(GridCoverage coverage, GeneralParameterValue... parameters) Takes a GridCoverage and writes the image to the destination file.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 Details
-
WorldImageWriter
Destination must be a File. The directory it resides in must already exist. It must point to where the raster image is to be located. The world image will be derived from there. -
WorldImageWriter
Destination must be a File. The directory it resides in must already exist. It must point to where the raster image is to be located. The world image will be derived from there.
-
-
Method Details
-
getFormat
(non-Javadoc)- Specified by:
getFormat
in interfaceGridCoverageWriter
- See Also:
-
write
public void write(GridCoverage coverage, GeneralParameterValue... parameters) throws IllegalArgumentException, IOException Takes a GridCoverage and writes the image to the destination file. It then reads the format of the file and writes an accompanying world file. It will throw a FileFormatNotCompatibleWithGridCoverageException if Destination is not a File (URL is a read-only format!).- Specified by:
write
in interfaceGridCoverageWriter
- Parameters:
coverage
- the GridCoverage to write.parameters
- no parameters are accepted. Currently ignored.- 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:
-