[gdal-dev] Looking to understand /vsicurl usage...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[gdal-dev] Looking to understand /vsicurl usage...

Carl Godkin-2
Hi,

The OpenTopography site provides a web service to download its SRTM data.  See


where there is an example URL for a query (that works).

What I don't understand is that 

gdalinfo "/vsicurl/<example URL>" 


but 

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.

Thanks very much,

carl

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Looking to understand /vsicurl usage...

Even Rouault-2

On samedi 17 juin 2017 18:34:37 CEST Carl Godkin wrote:

> Hi,

>

> The OpenTopography site provides a web service to download its SRTM data.

> See

>

> http://www.opentopography.org/developers#SRTM

>

> 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/

> http://opentopo.sdsc.edu/otr/getdem?demtype=SRTMGL3&west=-120.168457&south=3

> 6.738884&east=-118.465576&north=38.091337&outputFormat=GTiff' not recognized

> as a supported file format."

>

> but

>

> 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.

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Loading...