[gdal-dev] vsicurl and HTTP error 403

Ivan Lucena ivan.lucena at outlook.com
Thu Apr 9 04:52:44 PDT 2020


Even,

You are right. I wouldn't use the double /vsi in gdal_translate. It just happened that I found a corrupted file on tile x33y13 date 2013/249 and I wanted to know if I could pass the gdalinfo command to other people. I will download same sample files, run gdalinfo on my machine and  copy and paste the gdalinfo report.

Thanks man, you are the best. Take care,

Ivan

________________________________
From: Even Rouault <even.rouault at spatialys.com>
Sent: Wednesday, April 8, 2020 6:41 PM
To: gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
Cc: Ivan Lucena <ivan.lucena at outlook.com>
Subject: Re: [gdal-dev] vsicurl and HTTP error 403


Ivan,



Experimentally, I find that this particular server doesn't like HTTP requests without a

User-Agent and, more annoying, that it doesn't like Range requests used by /vsicurl/.

But as this a gzip file, seeking into it would be a inefficient process.



So the following, defining a user agent, and using /vsicurl_streaming/ that doesn't

issue range request (but require downloading everything from the beginning when

a backward seek is needed) works

gdal_translate /vsigzip//vsicurl_streaming/https://gimms.gsfc.nasa.gov/MODIS/std/GMOD09Q1/tif/NDVI/2019/249/GMOD09Q1.A2019249.08d.latlon.x33y07.6v1.NDVI.tif.gz --config GDAL_DISABLE_READDIR_ON_OPEN EMPTY_DIR --config GDAL_HTTP_USERAGENT foo



But local downloading of the file is probably a better strategy here.



Even



--

Spatialys - Geospatial professional services

http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200409/608d49ad/attachment-0001.html>


More information about the gdal-dev mailing list