Feature request #10124
take advantage of gdal's vsipreload mechanism to support VSIFILE on all formats
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Data Provider/OGR | ||
Pull Request or Patch supplied: | No | Resolution: | |
Easy fix?: | No | Copied to github as #: | 18586 |
Description
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
LD_PRELOAD=vsipreload.so qgis.bin
I am not sure about licensing issues though, can we copy the port/vsipreload.cpp to qgis source legally? Looks ok to me.
History
#1
Updated by Etienne Tourigny almost 11 years ago
- File vsipreload-patch.txt
added
- File vsipreload.cpp
added
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.
#2
Updated by Paolo Cavallini almost 11 years ago
A pull request is probably better.
#3
Updated by Etienne Tourigny almost 11 years ago
- File landsat-gz.nc.gz added
#4
Updated by Etienne Tourigny almost 11 years ago
added a pull request, this works with debian build
#5
Updated by Alexander Bruy over 8 years ago
- Category changed from Build/Install to Data Provider/OGR
#6
Updated by Giovanni Manghi almost 8 years ago
- Easy fix? set to No