[gdal-dev] Looking to understand /vsicurl usage...
even.rouault at spatialys.com
Sun Jun 18 02:09:49 PDT 2017
On samedi 17 juin 2017 18:34:37 CEST Carl Godkin wrote:
> The OpenTopography site provides a web service to download its SRTM data.
> where there is an example URL for a query (that works).
> What I don't understand is that
> gdalinfo "/vsicurl/<example URL>"
> fails with "ERROR 4: `/vsicurl/
> 6.738884&east=-118.465576&north=38.091337&outputFormat=GTiff' not recognized
> as a supported file format."
> gdalinfo "<example URL>"
> works just fine. While it's wonderful that it works, I'm looking to do
> something like this from a C++ program so I would like to understand why
> /vsicurl is not used in this situation.
/vsicurl/ requires the server to accept random reading with Range HTTP headers. This is
generally the case for HTTP server that serve static files. But in the example you show, it
seems the server will dynamically generate the content and in that case it doesn't seem to be
the case. It responds with chunked transfer encoding, which /vsicurl/ doesn't support.
If you just do gdalinfo http://.... , the pseudo HTTP driver will download in-memory the whole
file with a regular non-ranged GET before passing it to other GDAL drivers.
Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev