[gdal-dev] vsipreload: enabling VSI Virtual File API for regular I/O

Even Rouault even.rouault at mines-paris.org
Tue May 28 10:59:09 PDT 2013


Le mardi 28 mai 2013 16:27:21, Etienne Tourigny a écrit :
> On Tue, May 28, 2013 at 11:24 AM, Howard Butler <hobu.inc at gmail.com> wrote:
> > On May 26, 2013, at 9:46 AM, Even Rouault <even.rouault at mines-paris.org>
> > 
> > wrote:
> > > This file is the source code for a standalone 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 I/O API.
> > > 
> > > This can work with all VSI Large File API filesystems : /vsizip/ ,
> > 
> > /vsitar/,
> > 
> > > /vsisubfile/ , etc...
> > 
> > Cool!
> 
> Way cool, Even! I'll test it when I have the time.
> 
> > Next question, if you'll pardon my ignorance, why would we ever want to
> > do this? What does the VSI preload provide?
> 
> You can open files over ftp/http connexions and files that are compressed
> inside zip/tgz/gz archives. This was not previously possible with certain
> drivers (hdf4, netcdf, etc.)

Yes exactly, my examples were supposed to illustrate the use cases where it 
was needed. A few drivers do not support the /vsi file systems because they use 
directly the standard IO functions and provide no way of redirecting them 
through the VSI virtual file API, because their underlying library doesn't offer 
this capability.

An alternate way of offering the same capability would be to write a fuse 
module (would probably be less hackish) since the API of fuse modules is much 
more limited than the one of glibc (you have only one read function not read() 
and fread() )!

> 
> > Howard
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list