[Geotiff] User-defined keys

Frank Warmerdam warmerdam at pobox.com
Mon Oct 24 11:59:37 EST 2011


On Mon, Oct 24, 2011 at 9:38 AM,  <tim.nightingale at stfc.ac.uk> wrote:
> Dear All,
>
>  How do you write user-defined keys? The GeoTIFF specification allows
> user-defined keys with codes of 32768 and above (section 2.7.2), but the
> libgeotiff library function GTIFKeySet() only accepts legal geokey_t
> enumerations.
>
>  My tentative conclusion is that I must extend the list "geokeys.inc"
> before compiling. Is this right, and is there anything else I must do?

Tim,

Skimming through the geo_set.c code I don't see any sign that it is
necessary to have a geokey defined in geokeys.inc before you can
set them in a file.  As far as I know you can just call GTIFKeySet()
with your own codes and things should work though I haven't tested
this.

If you want listgeo to report your user defined geokeys with a
symbolic name then you would need to add them to geokeys.inc.
I think it exists primarily to associate symbolic names with the
geokey values.

I see that you don't need to define their type or anything.  This
is all defined by the call to GTIFKeySet().

Best regards,


-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer


More information about the Geotiff mailing list