Class GeoTIFFDirectory

java.lang.Object
org.libtiff.jai.codec.XTIFFDirectory
org.geotiff.image.jai.GeoTIFFDirectory
All Implemented Interfaces:
Serializable

public class GeoTIFFDirectory extends XTIFFDirectory implements Serializable
An extension of the XTIFFDirectory that understands the structure of the GeoTIFF key set
Author:
Niles D. Ritter
See Also:
  • Constructor Details

    • GeoTIFFDirectory

      public GeoTIFFDirectory()
      public constructor (for serializability)
    • GeoTIFFDirectory

      public GeoTIFFDirectory(com.sun.media.jai.codec.SeekableStream stream, long ifd_offset) throws IOException
      Constructs a GeoTIFFDirectory by reading a SeekableStream. The ifd_offset parameter specifies the stream offset from which to begin reading; this mechanism is sometimes used to store private IFDs within a TIFF file that are not part of the normal sequence of IFDs.
      Throws:
      IOException
    • GeoTIFFDirectory

      public GeoTIFFDirectory(com.sun.media.jai.codec.SeekableStream stream, int directory) throws IOException
      Constructs a GeoTIFFDirectory from a SeekableStream. The directory parameter specifies which directory to read from the linked list present in the stream; directory 0 is normally read but it is possible to store multiple images in a single TIFF file by maintaing multiple directories.
      Throws:
      IOException
  • Method Details

    • getFields

      public XTIFFField[] getFields()
      Returns an array of XTIFFFields containing all the fields in this directory. Prior to returning array, determine if there are any GeoKeys, and if so, set up the corresponding GeoTIFF fields.
      Overrides:
      getFields in class XTIFFDirectory
    • addGeoKey

      public void addGeoKey(int key, int type, int count, Object data)
      Add a geoKey to the directory
    • addGeoKey

      public void addGeoKey(XTIFFField geoKey)
      Add an existing geoKey to the directory.
    • getGeoKeys

      public XTIFFField[] getGeoKeys()
      Returns an array of XTIFFFields containing all the fields corresponding to the GeoKeys.
    • getGeoKey

      public XTIFFField getGeoKey(int key)
      Indexed Accessor to the Geokeys,indexed by the key values.
    • getTiepoints

      public double[] getTiepoints()
      return the tiepoint tag values
    • getPixelScale

      public double[] getPixelScale()
      return the pixel scale tag values
    • getTransformationMatrix

      public double[] getTransformationMatrix()
      return the transformation matrix tag values
    • setTiepoints

      public void setTiepoints(double[] tiepoints)
      set the tiepoint tag values
    • setPixelScale

      public void setPixelScale(double[] scales)
      return the pixel scale tag values
    • setTransformationMatrix

      public void setTransformationMatrix(double[] matrix)
      return the pixel scale tag values