Meta data system for GDAL?

Frank Warmerdam warmerdam at p...
Fri Mar 2 15:13:43 EST 2001


Simon Perkins wrote:
> That's certainly feasible for FITS. I thought that TIFF could have
> aribtrary metadata (user-defined tags), but obviously I was mistaken. I
> guess for TIFF I could embed the information I need to store in
> something like the Image Description field.

Simon, 

Correct, there are no arbitrary user defined fields. Embedding 
within something like the description is likely the best.

> OK. When do you suggest that meta data should be written? When the
> dataset is closed is one option. What about having an explicit
> WriteMetaData() method?

I often do it on close, but it can depend on the format. 

> Fair enough. Although, in the case of meta data I notice that your meta
> data names are all format specific, so you still need to know what the
> format is to know how to interpret the meta data.

Well, currently the metadata is usually just used for display to the
user. You are correct, meaningful use of the metadata would require
a deeper knowledge of the source.

> Maybe FITS was a bad example, 'cos the keys are strings, which
> corresponds well to your meta data system. In TIFF though, I would have
> thought the keys were tags (shorts or integers, I forget which), which
> doesn't mesh so nicely with the existing meta data system, expecially if
> those tags are user-defined things that the Driver knows nothing about.

Well, I could always use "TIFFTAG_%d" as the name, but that would be a
hack. 

> > I would strongly encourage you to try and fit within the existing metadata
> > model.
> 
> You've just about convinced me. I will try to work within the existing
> system. Let me know at what point you think meta data should be written
> though, if you would. Also would you be happy for me to modify the
> geotiff driver, to update the image description in the file from the one
> stored in meta data at some point?

Things like the image description in TIFF have to be written before any 
image data is written. Essentially this would have to be done in the
Crystalize() method, with is the last opportunity to stuff in the 
directory. 

TIFF is a hairy case. 

Feel free to update the GeoTIFF driver, but let me know when you have
committed your changes so I can look them over. 

Best regards,

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




More information about the Gdal-dev mailing list