Implementing GeoKeys (GeoTIFF tags)

GeoTIFF files are TIFF files containing a few extra TIFF tags, describing the image location, scale at which the picture was taken and many other information useful for topographic applications.

The GeoTIFF extra data is stored using six standard tags. The following three tags contain scaling information:

image\sqrblit.gif ModelTiepointTag = 33922 (0x8482)

image\sqrblit.gif ModelPixelScaleTag = 33550 (0x830E)

image\sqrblit.gif ModelTransformationTag = 33920 (0x8480)

The following three tags contain many extra values. We will refer to these values stored in these three tags as "GeoKeys":

image\sqrblit.gif GeoKeyDirectoryTag 34375 (0x87AF) – This tag will store all the keys and the SHORT values.

image\sqrblit.gif GeoDoubleParamsTag 34736 (0x87B0) – This tag will store the DOUBLE values.

image\sqrblit.gif GeoAsciiParamsTag 34737 (0x87B1) – This tag will store the ASCII values.

There are 65536 possible GeoKeys values. The GeoTIFF specification recommends you to use the following ranges (domains) for the GeoTIFF data:

0..1023

Do not use; reserved for future use

1024..2047

GeoTIFF configuration keys.

2048..3071

Geographic/Geocentric CS Parameter Keys

3072..4095

Projected CS Parameter Keys

4096..5119

Vertical CS Parameter keys

5120..32767

Reserved

32768..65535

Private use – use to store your own data

For more information on the GeoTIFF tags and for the complete list of the predefined GeoKeys values; refer to the GeoTIFF specifications found on http://home.earthlink.net/~ritter/geotiff/geotiff.html or http://www.remotesensing.org/geotiff/geotiff.html URLs.

GeoTIFF files also support standard TIFF tags. For more information on standard TIFF tags, refer to Implementing TIFF Tags.

The GeoKeys can be set in preparation for writing or saving files with SetGeoKey method. The GeoKey information will be available in the following properties:

GeoKeyType property

GeoKeyCount property

GeoKeyData property

You can obtain the list of GeoKeys that have been set using GetGeoKey method.

The user can write the GeoKeys in two ways:

1.

When saving a new image as FILE_GEOTIFF with Save method.

2.

You can update an existing file, using WriteFileGeoKeys or WriteMetaData methods.

You can enumerate the GeoKeys from an existing file using EnumFileGeoKeys method. For each GeoKeys enumerated by EnumFileGeoKeys, an EnumGeoKeys event is called. To stop firing the EnumGeoKeys event, set the value of StopFireEnumGeoKeys property to TRUE.

You can read a particular GeoKey from a file using ReadFileGeoKey method.