Class GeoTIFFDataWriter

java.lang.Object
noaa.coastwatch.io.EarthDataWriter
noaa.coastwatch.io.GeoTIFFDataWriter

public class GeoTIFFDataWriter extends EarthDataWriter

The GeoTIFFDataWriter encodes a set of data variables as a 32-bit floating-point value multiband TIFF file with GeoTIFF georeferencing tags. The resulting image file is not suitable for display, but can be imported into GIS systems.

Since:
3.5.1
Author:
Peter Hollemans
  • Constructor Details

    • GeoTIFFDataWriter

      public GeoTIFFDataWriter(EarthDataInfo info, String filename, int compress) throws IOException
      Creates a new writer.
      Parameters:
      info - the info object to use for earth transform and other attributes.
      filename - the new GeoTIFF file name.
      compress - the TIFF compression type, either COMP_NONE, COMP_DEFLATE, COMP_PACK, or COMP_LZW.
      Throws:
      IOException - if an error occurred the file.
  • Method Details

    • setMissing

      public void setMissing(float missing)
      Sets the missing value.
      Parameters:
      missing - the missing value. The missing value is used to represent missing or out of range data. By default, Float.NaN is used as the missing value.
    • flush

      public void flush() throws IOException
      Description copied from class: EarthDataWriter
      Flushes all unwritten data to the destination.
      Specified by:
      flush in class EarthDataWriter
      Throws:
      IOException - if the data destination had I/O errors.
    • close

      public void close() throws IOException
      Description copied from class: EarthDataWriter
      Closes the writer and frees any resources. The flush method is called prior to closing.
      Specified by:
      close in class EarthDataWriter
      Throws:
      IOException - if the data destination had I/O errors.