Package org.geotools.gce.image
Class WorldImageFormat
Object
AbstractGridFormat
WorldImageFormat
- All Implemented Interfaces:
Format
A Format to allow discovery of Readers/Writers for raster images that support world files containing information
about the image. Supports gif+gfw, jpg/jpeg+jgw, tif/tiff+tfw and png+pgw. wld may be used in place of the format
specific extension (jpg+wld, etc) Designed to be used with GridCoverageExchange.
- Author:
- Simone Giannecchini
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParameterDescriptor<String>Format writing parameter.Fields inherited from class AbstractGridFormat
BACKGROUND_COLOR, BANDS, DECIMATION_POLICY, ELEVATION, FOOTPRINT_BEHAVIOR, GEOTOOLS_WRITE_PARAMS, INPUT_TRANSPARENT_COLOR, INTERPOLATION, mInfo, OVERVIEW_POLICY, PROGRESS_LISTENER, READ_GRIDGEOMETRY2D, readParameters, RESCALE_PIXELS, SUGGESTED_TILE_SIZE, TILE_SIZE_SEPARATOR, TIME, USE_IMAGEN_IMAGEREAD, writeParameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTakes the input and determines if it is a class that we can understand and then futher checks the format of the class to make sure we can read/write to it.Always returns null since for the moment there are noGeoToolsWriteParamsavailable for this format.Retrieves aWorldImageReaderin case the providedesourcecan be accepted as a valid source for a world image.Retrieves aWorldImageReaderin case the providedesourcecan be accepted as a valid source for a world image.getWorldExtension(String fileExtension) Takes an image file extension (such as .gif, including the '.') and returns it's corresponding world file extension (such as .gfw).Call the accepts() method before asking for a writer to determine if the current object is supported.Call the accepts() method before asking for a writer to determine if the current object is supported.Methods inherited from class AbstractGridFormat
accepts, equals, getDefaultCRS, getDescription, getDocURL, getName, getReadParameters, getVendor, getVersion, getWriteParametersMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Format
getDescription, getDocURL, getName, getReadParameters, getVendor, getVersion, getWriteParameters
-
Field Details
-
FORMAT
Format writing parameter. When writing a world image we need to provide an output format in which we want to encode the image itself. PNG is default output format.
-
-
Constructor Details
-
WorldImageFormat
public WorldImageFormat()WorldImageFormat
-
-
Method Details
-
getReader
Retrieves aWorldImageReaderin case the providedesourcecan be accepted as a valid source for a world image. The method returns null otherwise.- Specified by:
getReaderin classAbstractGridFormat- Parameters:
source- The source object to read a WorldImage from- Returns:
- a new WorldImageReader for the source
-
getWriter
Call the accepts() method before asking for a writer to determine if the current object is supported.- Specified by:
getWriterin classAbstractGridFormat- Parameters:
destination- the destination object to write a WorldImage to- Returns:
- a new WorldImageWriter for the destination
-
getWriter
Call the accepts() method before asking for a writer to determine if the current object is supported.- Specified by:
getWriterin classAbstractGridFormat- Parameters:
destination- the destination object to write a WorldImage tohints-Hintsto control the internal machinery.- Returns:
- a new WorldImageWriter for the destination
-
accepts
Takes the input and determines if it is a class that we can understand and then futher checks the format of the class to make sure we can read/write to it.- Specified by:
acceptsin classAbstractGridFormat- Parameters:
input- The object to check for acceptance.hints-Hintsto control the accepts internal machinery.- Returns:
- true if the input is acceptable, false otherwise
-
getWorldExtension
Takes an image file extension (such as .gif, including the '.') and returns it's corresponding world file extension (such as .gfw).- Parameters:
fileExtension- an image file extension, including the '.'- Returns:
- a corresponding
Setof world file extensions, including the '.'
-
getReader
Retrieves aWorldImageReaderin case the providedesourcecan be accepted as a valid source for a world image. The method returns null otherwise.- Specified by:
getReaderin classAbstractGridFormat- Parameters:
source- The source object to read a WorldImage fromhints-Hintsto control the providedWorldImageReader.- Returns:
- a new WorldImageReader for the source
-
getDefaultImageIOWriteParameters
Always returns null since for the moment there are noGeoToolsWriteParamsavailable for this format.- Specified by:
getDefaultImageIOWriteParametersin classAbstractGridFormat- Returns:
- always null.
-