Class 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
    • Constructor Detail

      • GeoTiffFormat

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

      • 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.