#include "l_bitmap.h"

L_LTFIL_API L_INT L_ReadFileGeoKey(pszFile, uTag, puType, pCount, pData, pLoadOptions)

L_TCHAR * pszFile;

input file name

L_UINT16 uTag;

GeoKey to identify the data in the GeoTIFF file

L_UINT* puType;

pointer to a variable

L_UINT* pCount;

pointer to a variable

L_VOID* pData;

pointer to the buffer for the data


pointer to optional extended load options

Gets the specified GeoKey data from a TIFF file. This function is provided to support GeoKeys that you define.

Parameter Description
pszFile Character string that contains the input file name to load.
uTag GeoKey ID that you specified by calling L_SetGeoKey function. Values of the GeoKey ID range between 0 and 65535. Possible ranges are:
  Range Meaning
  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.
puType Pointer to a variable to be updated with the GeoKey type. This indicates whether the data pointed to by pData is SHORT, DOUBLE or ASCII. Possible values are:
  Value Meaning
  TAG_ASCII [2] The data pointed to by pData is an array of ASCII bytes.
  TAG_SHORT [3] The data pointed to by pData is an array of SHORT values (2 bytes each).
  TAG_DOUBLE [12] The data pointed to by pData is an array of floating points in DOUBLE format (8 bytes each).
TAG_IFD [13] 32-bit IFD offset.
TAG_LONG8 [16] Unsigned 64-bit integer (valid only for BigTIFF formats).
TAG_SLONG8 [17] Signed 64-bit integer (valid only for BigTIFF formats).
TAG_IFD8 [18] 64-bit IFD offset (valid only for BigTIFF formats).
pCount Pointer to the variable to be updated with the number of items required for the pData buffer. Note that this is not the required number of bytes. The required number of bytes will be (*puCount) * number of bytes per value (1 for ASCII, 2 for SHORT, 8 for DOUBLE).

If pData passed as NOT NULL, this variable will be updated with the count of data items.

pData Pointer to the buffer to be updated with the data. You can pass NULL if you want to use this function's return value to determine the required buffer size.
pLoadOptions Pointer to optional extended load options. Pass NULL to use the default load options.



The function was successful.

< 1

An error occurred. Refer to Return Codes.


You can use this function to obtain the GeoKey data from a particular file.

It is often convenient to call this function twice, as follows:


Call the function the first time, specifying NULL in the pData parameter, and using the return value to determine the required size of the buffer.


Allocate the buffer.


Call the function the second time, passing a pointer to your buffer in the pData parameter.

The most efficient way of reading the GeoKeys in a file is to enumerate them with L_EnumFileGeoKeys and then read each GeoKey with L_ReadFileGeoKey.

For more information about GeoKeys, refer to Implementing GeoKeys (GeoTIFF tags).

Required DLLs and Libraries



For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.


Win32, x64, Linux.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help