[Gdal-dev] autoload drivers doesn't load some (bugzilla down)

William Kyngesburye woklist at kyngchaos.com
Sat Nov 25 12:02:44 EST 2006


(I thought the remotesensing.org bugzilla would be back up by now.  I  
hope you don't mind a bug report on the list.)

Some GDAL drivers include multiple formats, with separate  
GDALRegister_* functions for each.  When built into GDAL, they are  
properly loaded by GDALAllRegister().  As a plugin, only the format  
of the plugin name is loaded by AutoLoadDrivers(), and any secondary  
formats are not.  This affects NetCDF (NetCDF + GMT), HDF4 (HDF4 +  
HDF4Image), HDF5 (HDF5 + HDF5Image), and ECW (ECW + JP2ECW).  There  
is also one similar case in OGR: ILI.

I don't know how correct this is, but I was able to solve the problem  
by calling the secondary GDALRegister_ from the primary  
GDALRegister_.  ie for HDF4, within GDALRegister_HDF4(), call  
GDALRegister_HDF4Image() after HDF4 is registered.

In case GDAL is built with the drivers within GDAL, the secondary  
driver calls should then be removed from GDALAllRegister(), to  
eliminate unnecessary redundant calls to those.


-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy





More information about the Gdal-dev mailing list