[gdal-dev] Is this vsi* behavior intended?

Joaquim Luis jluis at ualg.pt
Sat Jan 21 15:59:40 EST 2012


On 21-01-2012 08:35, Even Rouault wrote:
> Le samedi 21 janvier 2012 03:21:43, Joaquim Luis a écrit :
>> Hi,
>>
>> I'm puzzled with this behavior of the vsi* functions
>>
>> The first call that uses vsigzip because file is gzipped
>> /vsigzip/vsicurl/http:.../...30S.ACE2.gz gives an error. However, if I
>> remove the the '/vsigzip' than the command runs fine and I'm able to
>> access the file.
>>
>> Is this intended (it took me quite a while to figure this out)?
> Several points :
>
> * the correct syntax when combining /vsi.../ domains is to have a double slash
> between them :  /vsigzip//vsicurl/http:.../...30S.ACE2.gz
> * there was a typo in the ACE2 driver that prevented the above to work. The fix
> has been now commited
> * there is a autodetection mechanism in the ACE2 driver to automatically
> prepend /vsigzip/ in front of the filename if /vsigzip/ isn't already there and
> that the extension is .ace2.gz
>
> Hope that it explains everything.

Even,

Thanks for the explanation + fix but I was not aware that the correct 
syntax is to use a double slash. The docs does not sate that and in fact 
the examples there http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip 
show (for example)

ogrinfo -ro -al -so 
/vsizip/vsicurl/http://svn.osgeo.org/gdal/trunk/autotest/ogr/data/poly.zip

BTW, be careful using the ACE2 data. There are LOTS of inventions at 
sea. See example below made from 30N015W_BOTH_30S.ACE2.gz

Cheers

Joaquim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ace2.jpg
Type: image/jpeg
Size: 32714 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120121/c09f89fe/ace2-0001.jpg


More information about the gdal-dev mailing list