[Geotiff] Libtiff 4.0.0 Released

Frank Warmerdam warmerdam at pobox.com
Tue Jan 31 12:42:28 EST 2012


On Tue, Jan 31, 2012 at 7:42 AM, Fred Rothganger <fred at rothganger.org> wrote:
> * In GeoTIFF, I use the GTIFKeyInfo() function to reflect on the tags
> know to the library.  However, when setting tags in a new file, the
> function doesn't find anything unless it has already been set: a "catch
> 22".  Could GTIFKeyInfo() be modified so it returns known tags,
> independent of whether they are already in the file?  IE: similar to the
> function formerly known as TIFFFindFieldInfoByName()

Fred,

There is an enumerated list of geokeys with their numeric
value and textual name in the _keyInfo[] array declared in
geonames.h.  I think you could use it as a list.  But this
does not include the types, and in fact there is no
enforcement of particular keys having particular types in the
library.  It is entirely dependent on applications doing the right
thing.

I imagine geonames.h is not public.  If necessary I'd consider
providing a public function that exposes these declarations
in some fashion so it would be easy (easier) to turn numeric
values into names, and to see the list of valid numeric values.

> * In libtiff...  Well, version 4.0 pretty much killed
> TIFFFindFieldInfoByName(), and the apparent replacement
> TIFFFieldWithName() is unusable because TIFFField is held
> library-private.  It would be incredibly useful to either have public
> access to the fields of TIFFField, or have accessor functions for vital
> pieces of information from it (like the name of the tag, and parameters
> that indicate how to get/set it).
>
> The fact that access to TIFFField was hidden suggested to me that
> something like accessors were planned, but I can't find them.  OTOH, if
> there was a design decision to no longer allow clients of the library to
> reflect on tags, then I beg and plead the powers-that-be to reconsider.
> A significant part of what the tiff library does is manage tags.
> Removing reflection would be a severe lobotomy, and make my code more
> complex and fragile.

I believe Joris reworked the TIFFField / TIFFFieldInfo stuff for 4.0
and made TIFFField private so that the physical layout of the structure
would not be built into the ABI which was very fragile.   I'd be open to
the addition of one or a few accessors to TIFFField objects.

> To illustrate this, imagine what would happen to tiffset.c if it had to
> use only publicly available headers.

:-)

I'm willing to collaborate on accessors and perhaps we could use
successful migration of tiffset to public interfaces as a test case for
our success.  Would you be willing to propose accessors and provide
a patch or would you prefer I take the lead?

PS. I happen to be working on libtiff right now so this is good time
to keep after me on these points.

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