|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectImageWriter
SpatialImageWriter
ImageWriterAdapter
WorldFileImageWriter
public class WorldFileImageWriter
Writer for the World File format. This writer wraps an other image writer
for an "ordinary" image format, like TIFF, PNG or JPEG. This WorldFileImageWriter
delegates the writing of pixel values to the wrapped writer, and additionally creates two
small text files in the same directory than the image file, with the same filename
but a different extension:
See WorldFileImageReader for more information about the name, content and encoding
of those files.
WorldFileImageReader
| coverage/geotk-coverageio (download) | View source code for this class |
| Nested Class Summary | |
|---|---|
static class |
WorldFileImageWriter.Spi
Service provider interface (SPI) for WorldFileImageWriters. |
| Field Summary |
|---|
| Fields inherited from class ImageWriterAdapter |
|---|
main |
| Fields inherited from class ImageWriter |
|---|
availableLocales, locale, originatingProvider, output, progressListeners, warningListeners, warningLocales |
| Fields inherited from interface WarningProducer |
|---|
LOGGER |
| Constructor Summary | |
|---|---|
WorldFileImageWriter(WorldFileImageWriter.Spi provider)
Constructs a new image writer. |
|
WorldFileImageWriter(WorldFileImageWriter.Spi provider,
ImageWriter main)
Constructs a new image writer wrapping the given writer. |
|
| Method Summary | |
|---|---|
protected Object |
createOutput(String writerID)
Creates the output to be given to the writer identified by the given argument. |
protected void |
writeImageMetadata(IIOMetadata metadata,
int imageIndex,
ImageWriteParam param)
Invoked by the write methods when image metadata needs to be written. |
| Methods inherited from class Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorldFileImageWriter(WorldFileImageWriter.Spi provider)
throws IOException
provider - The ImageWriterSpi that is constructing this object.
IOException - If an error occurred while creating the main writer.
public WorldFileImageWriter(WorldFileImageWriter.Spi provider,
ImageWriter main)
provider - The ImageWriterSpi that is constructing this object, or null.main - The writer to use for writing the pixel values.| Method Detail |
|---|
protected Object createOutput(String writerID)
throws IOException
writerID argument is "main" (ignoring case), then this method delegates
to the super-class method. Otherwise
this method returns an output which is typically a File or URL
having the same name than the output of this writer, but a different
extension. The new extension is determined from the writerID argument, which can
be:
"tfw" for the World File."prj" for Map Projection file.
Subclasses can override this method for specifying a different main ("main"),
World File ("tfw") or Map Projection ("prj")
output. They can also invoke this method with other identifiers than the three above-cited
ones, in which case this method uses the given identifier as the extension of the returned
output. However the default WorldFileImageWriter implementation uses only
"main", "tfw" and "prj".
createOutput in class ImageWriterAdapterwriterID - "main" for the main output,
"tfw" for the World File output, or
"prj" for the Map Projection output. Other
identifiers are allowed but subclass-specific.
File or URL
object, or null if there is no output for the given identifier.
IOException - If an error occurred while creating the output.WorldFileImageReader.createInput(String)
protected void writeImageMetadata(IIOMetadata metadata,
int imageIndex,
ImageWriteParam param)
throws IOException
write methods when image metadata needs to be written.
The default implementation writes the World File if an affine
transform can be build from the rectified grid domain.
writeImageMetadata in class ImageWriterAdaptermetadata - The stream metadata, or null if none.imageIndex - The index of the image being written.param - The user-specified parameter, or null if none.
IOException - If an error occurred while writing the metadata.MetadataHelper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||