[Gdal-dev] Any way in GDAL to read only metadata from GeoTIFF file?

Wedding John B Dr DLVA WeddingJB at NSWC.NAVY.MIL
Thu May 20 18:07:05 EDT 2004


Greetings,

I have an application for which I want to use the parsing capabilities of
GDAL for GeoTIFF, DTED, and NITF.  However, the application already has a
nice image handling library (ImageMagick) and I'd prefer to use that for
displaying the image and manipulating it.  It handles TIFF, but ignores any
tags for extended TIFFs like GeoTIFF when loading the file.

What I'd like to do is to read the metadata information _only_ using GDAL,
store it, and read in the image data with the ImageMagick (IM) functions so
that I have all of the IM capability, but also have knowledge of the GeoTIFF
metadata.

I suppose that I could just use GDALOpen() but it seems dumb to load in the
whole image only to discard most of it.  The main reason why I don't use
libgeotiff directly is because I also want NITF and DTED parsing.

So my question is:  Is there any easy way in GDAL to read only metadata (not
the image data) from a GeoTIFF file (or any other supported format, for that
matter)?  Put another way, I'd like to fill everything in C++ GDALDataset
object, minus all of the raster bands and any values derived directly from
the raster band data.

Thanks in advance,

John Wedding



More information about the Gdal-dev mailing list