[Geotiff] User-defined keys
tim.nightingale at stfc.ac.uk
tim.nightingale at stfc.ac.uk
Mon Oct 24 12:29:38 EST 2011
Frank,
Thanks for getting back to me. The reason I asked was that the
definition of the key ID, geokey_t in geokeys.h is built from the
geokeys.inc list. I thought I might need a correctly enumerated
key value to get past the GTIFKeySet() header definition, though
once in, all ought to be fine, as you say.
Since I'm not that familiar with the library, I also wanted to
make sure that I wouldn't break anything else!
I guess we should try and see what happens.
Regards,
Tim.
On 24/10/2011 17:59, "Frank Warmerdam" <warmerdam at pobox.com> wrote:
>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
--
Scanned by iCritical.
More information about the Geotiff
mailing list