[Qgis-developer] zip&http?

Etienne Tourigny etourigny.dev at gmail.com
Mon May 7 09:52:06 PDT 2012

Hi Even,

On Mon, May 7, 2012 at 12:05 PM, Even Rouault
<even.rouault at mines-paris.org> wrote:
> Selon Etienne Tourigny <etourigny.dev at gmail.com>:
>> Hi,
>> my pleasure!
>> I agree that http support would be very cool, and perhaps not that
>> hard to implement (internally) since .zip support is  there.
>> However, where would this fit in the interface?  .zip support is
>> builtin the browser and file open dialogs, as the files reside on the
>> filesystem.
>> I personally have no interest in it so I cannot devote some time,
>> sorry!  Although I can help anybody that wishes to lead this effort.
>> There is also .tar.gz (and .tar) support that is missing, but that has
>> performance implications as the files have to be decompressed, whereas
>> .zip file contents are queried very fast.
>> .tar support would require the addition of a .tar reading lib, like
>> what is done in gdal/ogr.
> Reading in .tar or .tar.gz could be added in a similar way than the zip support
> by using the /vsitar/ mechanism. See the "How to use that capability with a .tar
> or .tar.gz/.tgz archive ?" paragraph of
> http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip . But as underlined by
> Etienne, due to the structure of .tar.gz files, on-the-fly reading in them is
> not efficient. .tar archives are different, but not particular popular.

For these reasons (and also for a perceived lack of tar lib - see
below) I did not devote any time for .tar and .tar.gz support.

> I'm not sure why you would need a .tar reading lib. What is in GDAL should be
> sufficient, by using the VSIReadDir() API to get the list of files and dirs in
> it and VSIStatL() to know their nature (file or dir). (That could have been used
> for zip file listing by the way)

I wasn't aware that the gdal api could be used to read zip (and other
compressed files such as .gz .tar.gz .tar), I was under the impression
that much functionality (such as getting a zipfile listing) was hidden
under the hood , in files like cpl_vsil_gzip.cpp but not in the API.

I may have not looked closely enough, but that is why I used quazip,
instead of copying bits and pieces of the gdal vsi functions to qgis.

Reading again VSIReadDir() and VSIStatL() there is no mention that
VSIReadDir() can handle anything other than directories - can you pass
it a zip file with proper syntax (/vsizip/file.zip) ?


>> Etienne
>> On Mon, May 7, 2012 at 4:57 AM, Paolo Cavallini <cavallini at faunalia.it>
>> wrote:
>> > Merci Etienne for the zip support.
>> > Any plan to support also http and zip over http?
>> > http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip
>> > *That* would be very cool.
>> > All the best.
>> >
>> > --
>> > Paolo Cavallini
>> > See: http://www.faunalia.it/pc
>> >
>> > _______________________________________________
>> > Qgis-developer mailing list
>> > Qgis-developer at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer

More information about the Qgis-developer mailing list