Class GeoTIFFDirectory
java.lang.Object
org.libtiff.jai.codec.XTIFFDirectory
org.geotiff.image.jai.GeoTIFFDirectory
- All Implemented Interfaces:
Serializable
An extension of the XTIFFDirectory that understands
the structure of the GeoTIFF key set
- Author:
- Niles D. Ritter
- See Also:
-
Field Summary
Fields inherited from class XTIFFDirectory
factory, stream, tileCodecs -
Constructor Summary
ConstructorsConstructorDescriptionpublic constructor (for serializability)GeoTIFFDirectory(com.sun.media.jai.codec.SeekableStream stream, int directory) Constructs a GeoTIFFDirectory from a SeekableStream.GeoTIFFDirectory(com.sun.media.jai.codec.SeekableStream stream, long ifd_offset) Constructs a GeoTIFFDirectory by reading a SeekableStream. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a geoKey to the directoryvoidaddGeoKey(XTIFFField geoKey) Add an existing geoKey to the directory.Returns an array of XTIFFFields containing all the fields in this directory.getGeoKey(int key) Indexed Accessor to the Geokeys,indexed by the key values.Returns an array of XTIFFFields containing all the fields corresponding to the GeoKeys.double[]return the pixel scale tag valuesdouble[]return the tiepoint tag valuesdouble[]return the transformation matrix tag valuesvoidsetPixelScale(double[] scales) return the pixel scale tag valuesvoidsetTiepoints(double[] tiepoints) set the tiepoint tag valuesvoidsetTransformationMatrix(double[] matrix) return the pixel scale tag valuesMethods inherited from class XTIFFDirectory
addField, addField, create, create, create, createField, createTileCodec, createTileCodec, getCompression, getField, getFieldAsByte, getFieldAsByte, getFieldAsDouble, getFieldAsDouble, getFieldAsFloat, getFieldAsFloat, getFieldAsLong, getFieldAsLong, getImageType, getNumDirectories, getNumEntries, getTags, getTileCodec, initialize, isBigEndian, isTagPresent, isTiled, readDouble, readFieldValue, readFloat, readHeader, readInt, readLong, readShort, readUnsignedInt, readUnsignedShort, registerTileCodec, setCompression, setFactory, setImageType, setIsTiled, sizeOfType, unRegisterTileCodec
-
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
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:
getFieldsin classXTIFFDirectory
-
addGeoKey
Add a geoKey to the directory -
addGeoKey
Add an existing geoKey to the directory. -
getGeoKeys
Returns an array of XTIFFFields containing all the fields corresponding to the GeoKeys. -
getGeoKey
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
-