MDM_GEOTIFF.GeoKeyDirectory Property

FreeImage.NET

MDM_GEOTIFFGeoKeyDirectory Property
Gets or sets the value of the GeoTIFF GeoKeyDirectoryTag.

Namespace: FreeImageAPI.Metadata
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public ushort[] GeoKeyDirectory { get; set; }

Property Value

Type: UInt16
Remarks
The GeoKeyDirectoryTag may be used to store the GeoKey Directory, which defines and references the GeoKeys.

The tag is an array of unsigned UInt16 values, which are primarily grouped into blocks of 4. The first 4 values are special, and contain GeoKey directory header information. The header values consist of the following information, in order:

Header={KeyDirectoryVersion, KeyRevision, MinorRevision, NumberOfKeys}

where

KeyDirectoryVersion indicates the current version of Key implementation, and will only change if this Tag's Key structure is changed. (Similar to the TIFFVersion (42)). The current DirectoryVersion number is 1. This value will most likely never change, and may be used to ensure that this is a valid Key-implementation.

KeyRevision indicates what revision of Key-Sets are used.

MinorRevision indicates what set of Key-Codes are used. The complete revision number is denoted <KeyRevision>.<MinorRevision>.

NumberOfKeys indicates how many Keys are defined by the rest of this Tag.

This header is immediately followed by a collection of <NumberOfKeys> KeyEntry sets, each of which is also 4-UInt16 long. Each KeyEntry is modeled on the TIFFEntry format of the TIFF directory header, and is of the form:

KeyEntry = { KeyID, TIFFTagLocation, Count, Value_Offset }

where

KeyID gives the Key-ID value of the Key (identical in function to TIFF tag ID, but completely independent of TIFF tag-space),

TIFFTagLocation indicates which TIFF tag contains the value(s) of the Key: if TIFFTagLocation is 0, then the value is UInt16, and is contained in the Value_Offset entry. Otherwise, the type (format) of the value is implied by the TIFF-Type of the tag containing the value.

Count indicates the number of values in this key.

Value_Offset Value_Offset indicates the index-offset into the TagArray indicated by TIFFTagLocation, if it is nonzero. If TIFFTagLocation is 0 (zero) , then Value_Offset contains the actual (UInt16) value of the Key, and Count=1 is implied. Note that the offset is not a byte-offset, but rather an index based on the natural data type of the specified tag array.

Following the KeyEntry definitions, the KeyDirectory tag may also contain additional values. For example, if a key requires multiple UInt16 values, they shall be placed at the end of this tag, and the KeyEntry will set TIFFTagLocation=GeoKeyDirectoryTag, with the Value_Offset pointing to the location of the value(s).


Handling of null values

A null value indicates, that the corresponding metadata tag is not present in the metadata model. Setting this property's value to a non-null reference creates the metadata tag if necessary. Setting this property's value to a null reference deletes the metadata tag from the metadata model.

See Also