[gdal-dev] Revealing /vsi*/ for users
Thomas Gratier
osgeo.mailinglist at gmail.com
Sun Sep 9 07:00:33 PDT 2012
Hello Jukka,
I agree with you
You can also have a look on another gems : Even contribution to python
scripts
http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/gdal_ls.py
More easy to manipulate than original command line for listing zip content
When you do
ogrinfo -ro -al -so
/vsizip/vsicurl/http://svn.osgeo.org/gdal/trunk/autotest/ogr/data/poly.zip
it works because poly.zip contains directly the shp but for example
ogrinfo -ro -al -so /vsizip/vsicurl/
http://www.data.rennes-metropole.fr/fileadmin/user_upload/data/data_sig/deplacement/stationnement/stationnement_shp_lamb93.zip
will not work if you don't know the remote zip content
With
python gdal_ls.py -R -l -Rzip
http://www.data.rennes-metropole.fr/fileadmin/user_upload/data/data_sig/deplacement/stationnement/stationnement_shp_lamb93.zip
you list files and after you can choose the right path to get metadata in
the remote zip file e.g
ogrinfo -ro -al -so /vsizip/vsicurl/
http://www.data.rennes-metropole.fr/fileadmin/user_upload/data/data_sig/deplacement/stationnement/stationnement_shp_lamb93.zip/stationnement_shp_lamb93/donnees/
Others experiment show me you can also have some problems with remote
content because of restrictions on server side.
An
ogrinfo -ro -al -so /vsizip/vsicurl/
http://www.data.gouv.fr/var/download/6236df97128315a003614bab5201aea3.zip
will send you
ERROR 1: Range downloading not supported by this server !
ERROR 1: Range downloading not supported by this server !
because vsicurl rely on curl range ability and if not allowed...
Regards
ThomasG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120909/c4655a39/attachment.html>
More information about the gdal-dev
mailing list