org.geotools.gce.geotiff
Class GeoTiffFormat

Object
  extended by AbstractGridFormat
      extended by GeoTiffFormat
All Implemented Interfaces:
Format

public final class GeoTiffFormat
extends AbstractGridFormat
implements Format

Provides basic information about the GeoTIFF format IO. This is currently an extension of the Geotools AbstractGridFormat because the stream and file GCEs will pick it up if it extends AbstractGridFormat.

Author:
Bryce Nordgren, USDA Forest Service, Simone Giannecchini
Module:

Field Summary
 
Fields inherited from class AbstractGridFormat
GEOTOOLS_WRITE_PARAMS, mInfo, OVERVIEW_POLICY, READ_GRIDGEOMETRY2D, readParameters, USE_JAI_IMAGEREAD, writeParameters
 
Constructor Summary
GeoTiffFormat()
          Creates a new instance of GeoTiffFormat
 
Method Summary
 boolean accepts(Object o)
          Currently, we only accept files, and we open the file to verify that it has a GeoKeyDirectory tag.
 GeoToolsWriteParams getDefaultImageIOWriteParameters()
          Returns an instance of GeoTiffWriteParams for controlling an hypothetic writing process.
 GeoTiffReader getReader(Object source)
          If source is a file, this will return a reader object.
 GeoTiffReader getReader(Object source, Hints hints)
          If source is a file, this will return a reader object.
 GridCoverageWriter getWriter(Object destination)
          Retrieves a GeoTiffWriter or null if the provided destination is suitable.
 GridCoverageWriter getWriter(Object destination, Hints hints)
          Retrieves a GeoTiffWriter or null if the provided destination is suitable.
 
Methods inherited from class AbstractGridFormat
equals, getDefaultCRS, getDescription, getDocURL, getName, getReadParameters, getVendor, getVersion, getWriteParameters
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Format
getDescription, getDocURL, getName, getReadParameters, getVendor, getVersion, getWriteParameters
 

Constructor Detail

GeoTiffFormat

public GeoTiffFormat()
Creates a new instance of GeoTiffFormat

Method Detail

accepts

public boolean accepts(Object o)
Currently, we only accept files, and we open the file to verify that it has a GeoKeyDirectory tag. If anything more subtle is wrong with the file, we deal with that when we try and read it.

Specified by:
accepts in class AbstractGridFormat
Parameters:
o - the source object to test for compatibility with this format.
Returns:
true if "o" is a File or a URL that points to a GeoTiff with a GeoTiff file as a resource.

getReader

public GeoTiffReader getReader(Object source)
If source is a file, this will return a reader object. This file does not use hints in the construction of the geotiff reader.

Specified by:
getReader in class AbstractGridFormat
Parameters:
source - must be a GeoTiff File
Returns:
a GeoTiffReader object initialized to the specified File.

getReader

public GeoTiffReader getReader(Object source,
                               Hints hints)
If source is a file, this will return a reader object. This file does not use hints in the construction of the geotiff reader.

Specified by:
getReader in class AbstractGridFormat
Parameters:
source - must be a GeoTiff File
hints - Hints to pass the hypothetic GridCoverageReader to control its behaviour.
Returns:
a GeoTiffReader object initialized to the specified File.

getWriter

public GridCoverageWriter getWriter(Object destination,
                                    Hints hints)
Retrieves a GeoTiffWriter or null if the provided destination is suitable. This file does not use hints in the construction of the geotiff reader.

Parameters:
destination - must be a GeoTiff File
hints - Hints to pass the hypothetic GridCoverageReader to control its behaviour.
Returns:
a GeoTiffReader object initialized to the specified File.

getWriter

public GridCoverageWriter getWriter(Object destination)
Retrieves a GeoTiffWriter or null if the provided destination is suitable. This file does not use hints in the construction of the geotiff reader.

Specified by:
getWriter in class AbstractGridFormat
Parameters:
destination - must be a GeoTiff File
Returns:
a GeoTiffReader object initialized to the specified File.

getDefaultImageIOWriteParameters

public GeoToolsWriteParams getDefaultImageIOWriteParameters()
Returns an instance of GeoTiffWriteParams for controlling an hypothetic writing process.

Specified by:
getDefaultImageIOWriteParameters in class AbstractGridFormat
Returns:
an instance of GeoTiffWriteParams.


Copyright © 1996-2009 Geotools. All Rights Reserved.