[gdal-dev] GDAL Driver Changes

Simon Perkins s.perkins at l...
Fri Jun 21 23:10:18 EDT 2002


Frank Warmerdam wrote:
> Simon Perkins wrote:
> > While I think these changes are good, it does cause the slight
> > problem that the C++ API of GDAL, defined in gdal_priv.h has just
> > changed. As a result, some software I have that uses GDAL no
> > longer works.
> 
> Simon,
> 
> What specifically in the API has changed that is causing problems?

The old GDALDriver class had a field pszShortName, which has now gone. I
never did like acessing this field directly, but it seemed to be the
only way of getting at the driver name in a C++ way. FWIW, this approach
seems to be endorsed on the GDAL API tutorial page. Code that used to
access pszShortName directly now no longer compiles, so this is not just
an issue of binary compatibility. Anyway, I am changing my code to use
the C interface since this seems to be a little less sensitive to code
changes. I never did like including a header file called gdal_priv.h to
get at the C++ interface!


> > long, as required by the FITS format, so none of the new metadata
> > will get written by mistake (their keys are all longer than 8
> > chars). However, this is more through accident than design so I
> > should probably do something more sensible. Is this the kind of
> > problem that the "domain" field of the metadata was intended to
> > solve?
> 
> The metadata is specifically set on the GDALDriver object for the
> format, not the GDALDataset. I agree that putting stuff like this
> on the GDALDatasets would have significantly interfered with the
> existing normal use of metadata about datasets.

Ah, good point... My mistake.


> PS. I did update the FITS driver, though I didn't test it.

Thanks for that!

Cheers,

Sy




More information about the Gdal-dev mailing list