public class GeoTiffWriter extends AbstractGridCoverageWriter implements GridCoverageWriter
AbstractGridCoverageWriter implementation for the geotiff format.destination, hints, outStream| Constructor and Description |
|---|
GeoTiffWriter(Object destination)
Constructor for a
GeoTiffWriter. |
GeoTiffWriter(Object destination,
Hints hints)
Constructor for a
GeoTiffWriter. |
| Modifier and Type | Method and Description |
|---|---|
static IIOMetadata |
createGeoTiffIIOMetadata(ImageWriter writer,
ImageTypeSpecifier type,
GeoTiffIIOMetadataEncoder geoTIFFMetadata,
ImageWriteParam params)
Creates image metadata which complies to the GeoTIFFWritingUtilities specification for the
given image writer, image type and GeoTIFFWritingUtilities metadata.
|
void |
dispose()
Releases resources held by this
AbstractGridCoverageWriter. |
Format |
getFormat()
Returns the format handled by this
GridCoverageWriter. |
void |
setMetadataValue(String name,
String value)
Allows to setup metadata by leveraging on Ascii TIFF Tags.
|
void |
write(GridCoverage gc,
GeneralParameterValue[] params)
Writes the specified grid coverage.
|
finalize, getDestination, getMetadataNames, setCurrentSubnameclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDestination, getMetadataNames, setCurrentSubnamepublic GeoTiffWriter(Object destination) throws IOException
GeoTiffWriter.destination - IOExceptionpublic GeoTiffWriter(Object destination, Hints hints) throws IOException
GeoTiffWriter.destination - hints - IOExceptionpublic void setMetadataValue(String name, String value) throws IOException
setMetadataValue in interface GridCoverageWritersetMetadataValue in class AbstractGridCoverageWritername - is the Ascii TIFF Tag identifier. It can be a String representing: 1) a simple
Integer (referring to a tag ID) (in that case it will refer to the BaselineTIFFTagSet 2)
OR an identifier in the form: TIFFTagSet:TIFFTagID. As an instance:
"BaselineTIFFTagSet:305" in order to add the Copyright info.value - is the value to be assigned to that tag.IOException - if an error occurs during writing.GeoTiffIIOMetadataEncoder.TagSetpublic Format getFormat()
GridCoverageWriterGridCoverageWriter.getFormat in interface GridCoverageWriterpublic void write(GridCoverage gc, GeneralParameterValue[] params) throws IllegalArgumentException, IOException, IndexOutOfBoundsException
GridCoverageWriterwrite in interface GridCoverageWritergc - The grid coverage to write.params - An optional set of parameters. Should be any or all of the parameters
returned by Format.getWriteParameters().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.IllegalArgumentExceptionIndexOutOfBoundsExceptionpublic static final IIOMetadata createGeoTiffIIOMetadata(ImageWriter writer, ImageTypeSpecifier type, GeoTiffIIOMetadataEncoder geoTIFFMetadata, ImageWriteParam params) throws IIOException
writer - the image writer, must not be nulltype - the image type, must not be nullgeoTIFFMetadata - the GeoTIFFWritingUtilities metadata, must not be nullparams - IIOException - if the metadata cannot be createdpublic void dispose()
AbstractGridCoverageWriterAbstractGridCoverageWriter.dispose in interface GridCoverageWriterdispose in class AbstractGridCoverageWriterCopyright © 1996–2019 Geotools. All rights reserved.