Class GeoTiffFormat

Object
AbstractGridFormat
GeoTiffFormat
All Implemented Interfaces:
Format

public 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
  • Field Details

  • Constructor Details

    • GeoTiffFormat

      public GeoTiffFormat()
      Creates a new instance of GeoTiffFormat
  • Method Details

    • accepts

      public boolean accepts(Object o, Hints hints)
      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.
      hints - Hints to control the accepts internal machinery.
      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.

      Specified by:
      getWriter in class AbstractGridFormat
      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.