org.geotools.gce.image
Class WorldImageFormat

java.lang.Object
  extended byorg.geotools.data.coverage.grid.AbstractGridFormat
      extended byorg.geotools.gce.image.WorldImageFormat
All Implemented Interfaces:
org.opengis.coverage.grid.Format

public class WorldImageFormat
extends AbstractGridFormat
implements org.opengis.coverage.grid.Format

DOCUMENT ME!

Author:
rgould 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.

Field Summary
static org.opengis.parameter.ParameterDescriptor CRS
           
static org.opengis.parameter.ParameterDescriptor ENVELOPE
           
static org.opengis.parameter.ParameterDescriptor FORMAT
          Format writing parameter.
 
Fields inherited from class org.geotools.data.coverage.grid.AbstractGridFormat
CRSAuthorityfactoriesMap, mInfo, readParameters, writeParameters
 
Constructor Summary
WorldImageFormat()
          WorldImageFormat
 
Method Summary
 boolean accepts(java.lang.Object input)
          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.
 org.opengis.coverage.grid.GridCoverageReader getReader(java.lang.Object source)
          Call the accepts() method before asking for a reader to determine if the current object is supported.
static java.lang.String getWorldExtension(java.lang.String fileExtension)
          Takes an image file extension (such as .gif, including the '.') and returns it's corresponding world file extension (such as .gfw).
 org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.Object destination)
          Call the accepts() method before asking for a writer to determine if the current object is supported.
 
Methods inherited from class org.geotools.data.coverage.grid.AbstractGridFormat
addAuthorityFactory, equals, getAuthorityfactory, getDefaultCRS, getDescription, getDocURL, getName, getReadParameters, getVendor, getVersion, getWriteParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.coverage.grid.Format
getDescription, getDocURL, getName, getReadParameters, getVendor, getVersion, getWriteParameters
 

Field Detail

FORMAT

public static final org.opengis.parameter.ParameterDescriptor 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.


CRS

public static final org.opengis.parameter.ParameterDescriptor CRS

ENVELOPE

public static final org.opengis.parameter.ParameterDescriptor ENVELOPE
Constructor Detail

WorldImageFormat

public WorldImageFormat()
WorldImageFormat

Method Detail

getReader

public org.opengis.coverage.grid.GridCoverageReader getReader(java.lang.Object source)
Call the accepts() method before asking for a reader to determine if the current object is supported.

Specified by:
getReader in class AbstractGridFormat
Parameters:
source - The source object to read a WorldImage from
Returns:
a new WorldImageReader for the source

getWriter

public org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.Object destination)
Call the accepts() method before asking for a writer to determine if the current object is supported.

Specified by:
getWriter in class AbstractGridFormat
Parameters:
destination - the destination object to write a WorldImage to
Returns:
a new WorldImageWriter for the destination

accepts

public boolean accepts(java.lang.Object input)
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:
accepts in class AbstractGridFormat
Parameters:
input - The object to check for acceptance.
Returns:
true if the input is acceptable, false otherwise

getWorldExtension

public static java.lang.String getWorldExtension(java.lang.String fileExtension)
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 world file extension, including the '.'


Copyright © GeoTools. All Rights Reserved.