Feature request #10124
take advantage of gdal's vsipreload mechanism to support VSIFILE on all formats
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||18586|
More details on vsipreload and why it would be a good thing to have it inside QGIS
From gdal NEWS:
Add vsipreload.cpp that can be compiled as a shared library that can be LD_PRELOAD'ed as an overload of libc to enable VSI Virtual FILE API to be used with binaries using regular libc for I/O
Many formats (e.g. netcdf) cannot be read inside .zip files without this
basically, it could be implemented this way (at least in linux):
- create a shared lib vsipreload.so and install it with other qgis libs (e.g. /usr/lib/)
this is how it is done inside gdal, should be done in another manner in qgis
g++ -Wall -fPIC port/vsipreload.cpp -shared -o vsipreload.so -Iport -L. -L.libs -lgdal
- modify qgis startup script so that qgis is started like this
I am not sure about licensing issues though, can we copy the port/vsipreload.cpp to qgis source legally? Looks ok to me.
#1 Updated by Etienne Tourigny over 6 years ago
Attaching the vsipreload.cpp code and a patch that allows to build and install it as a shared library.
With this, qgis can be started using the LE_PRELOAD trick. It sould be easy to add this to the debian builds, which already use a startup script.