[gdal-dev] limiting drivers that get registered

Ben Elliston ben.elliston at anu.edu.au
Tue Mar 27 03:09:41 PDT 2018


Hi Even

On 08/03/18 23:34, Even Rouault wrote:

> If you use GDAL as a library from your own code (C/C++), you can also
> directly call the GDALRegister_XXXX() / OGRRegisterXXXX() functions you
> are interested in, instead of GDALAllRegister()

This is ideal, as it allows a handful of drivers to be registered first,
and then GDALAllRegister() to be called to register everything else down
the line. Unfortunately, it is impossible to know which drivers are
present until you call an undefined function in the GDAL shared library.
For example, GDALRegister_HDF4() is not defined if the HDF4 library
isn't found at configure time.

Is there any way to know which drivers are available at runtime?

Cheers,
Ben


More information about the gdal-dev mailing list