[gdal-dev] VSI handlers as plugin (shared library)

Even Rouault even.rouault at spatialys.com
Mon Nov 2 12:09:30 PST 2015


Le lundi 02 novembre 2015 20:58:59, Ivan Lucena a écrit :
> Hi there,
> 
> 
> What if we could build and distribute VSI handler as plugins?
> 
> 
> I developed a VSI handler that depends on other software, so I would rather
> not build the GDAL main library with that dependency and let the user
> decided if they want to use the plugin or not.
> 
> 
> We would need to have a code on cpl_vsil.cpp similar to AutoLoadDrivers()
> from  gdaldrivermanager.cpp to load vsi_XXX.{so,dll} dynamically.
> 
> 
> Would that be worth the effort? Any other cases where that could be useful?

Ivan,

You don't need to change anything in GDAL, assuming that you call 
GDALRegisterAll() at some point. Just add a C function GDALRegisterMe() in 
your shared module, call the shared object gdal_XXXXXXX.so/dll and you're 
done.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list