|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectIIOServiceProvider
ImageReaderWriterSpi
ImageWriterSpi
SpatialImageWriter.Spi
ImageWriterAdapter.Spi
WorldFileImageWriter.Spi
public static class WorldFileImageWriter.Spi
Service provider interface (SPI) for WorldFileImageWriters. This provider wraps
an other provider (typically for the TIFF, JPEG or PNG formats), which shall be specified
at construction time. The legal output types are String,
File, URI and URL in order to allow the image
writer to infer the World File (".tfw") and Map Projection
(".prj") files from the image output file.
Plugins registration
At the difference of other ImageWriter plugins, the WorldFileImageWriter
plugin is not automatically registered in the JVM. This is because there is many plugins
to register (one instance of this Spi class for each format to wrap), and because
attempts to get an ImageWriter to wrap while IIORegistry is scanning the
classpath for services cause an infinite loop. To enable the World File plugins,
users must invoke registerDefaults(ServiceRegistry) explicitly.
WorldFileImageReader.Spi
| coverage/geotk-coverageio (download) | View source code for this class |
| Field Summary |
|---|
| Fields inherited from class ImageWriterAdapter.Spi |
|---|
main |
| Fields inherited from class ImageWriterSpi |
|---|
outputTypes, readerSpiNames, STANDARD_OUTPUT_TYPE |
| Fields inherited from class IIOServiceProvider |
|---|
vendorName, version |
| Constructor Summary | |
|---|---|
WorldFileImageWriter.Spi(ImageWriterSpi main)
Creates a provider which will use the given format for writing pixel values. |
|
WorldFileImageWriter.Spi(String format)
Creates a provider which will use the given format for writing pixel values. |
|
| Method Summary | |
|---|---|
ImageWriter |
createWriterInstance(Object extension)
Creates a new World File writer. |
String |
getDescription(Locale locale)
Returns a brief, human-writable description of this service provider. |
Set<InformationType> |
getModifiedInformation(ImageTypeSpecifier type)
Returns the kind of information that this wrapper will add or modify compared to the ImageWriterAdapter.main writer. |
static void |
registerDefaults(ServiceRegistry registry)
Registers a default set of World File formats. |
static void |
unregisterDefaults(ServiceRegistry registry)
Unregisters the providers registered by registerDefaults(ServiceRegistry). |
| Methods inherited from class ImageWriterAdapter.Spi |
|---|
canEncodeImage, canEncodeImage, getImageMetadataFormat, getStreamMetadataFormat, isFormatLossless, onRegistration, unwrap |
| Methods inherited from class ImageWriterSpi |
|---|
createWriterInstance, getImageReaderSpiNames, getOutputTypes, isOwnWriter |
| Methods inherited from class IIOServiceProvider |
|---|
getVendorName, getVersion, onDeregistration |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorldFileImageWriter.Spi(ImageWriterSpi main)
main - The provider of the writers to use for writing the pixel values.
public WorldFileImageWriter.Spi(String format)
throws IllegalArgumentException
format - The name of the provider to use for writing the pixel values.
IllegalArgumentException - If no provider is found for the given format.| Method Detail |
|---|
public String getDescription(Locale locale)
getDescription in class IIOServiceProviderlocale - The locale for which the return value should be localized.
public Set<InformationType> getModifiedInformation(ImageTypeSpecifier type)
getModifiedInformation in class ImageWriterAdapter.Spitype - The layout of the image to be written.
public ImageWriter createWriterInstance(Object extension)
throws IOException
extension argument
is forwarded to the main provider with no change.
createWriterInstance in class ImageWriterSpiextension - A plug-in specific extension object, or null.
IOException - If the writer can not be created.@Configuration public static void registerDefaults(ServiceRegistry registry)
The current implementation registers plugins for the TIFF, JPEG, PNG, GIF, BMP,
matrix and ASCII-Grid (".prj" file only) formats, but this list can be
augmented in any future Geotk version.
registry - The registry where to register the formats, or null for
the default registry.Registry.setDefaultCodecPreferences(),
Setup@Configuration public static void unregisterDefaults(ServiceRegistry registry)
registerDefaults(ServiceRegistry).
registry - The registry from which to unregister the formats, or null
for the default registry.Setup
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||