[gdal-dev] vsigzip woes with hgt.gz files
even.rouault at spatialys.com
Wed Aug 23 07:20:27 PDT 2017
On mercredi 23 août 2017 16:01:05 CEST Vincent Schut wrote:
> Hi all,
> I'm trying to get the /vsigzip/ driver working on srtm .hgt.gz files,
> but I don't succeed:
> gdalinfo /vsigzip/N37W105.hgt.gz
> ERROR 4: `/vsigzip/N37W105.hgt.gz' not recognized as a supported file
> gdalinfo failed - unable to open '/vsigzip/N37W105.hgt.gz'.
> This is with a .hgt.gz from here:
> gunzipping the file works OK.
> Any hints?
Fixed per https://trac.osgeo.org/gdal/ticket/7016
However opening time is really slow (which might be a problem or not depending on what
you're doing) as the whole file needs to be downloaded and decompressed. The reason is
that .hgt files are pure raw data files without any header, so the only way to know the
dimensions is to check the file size against 3601*3601*2 bytes (SRTM 3 at low latitudes),
3601*1801*2 (SRTM 3 at high latitudes) or 1801*1801*2 (SRTM 1). But for a .gz file, the
only way to get the uncompressed file size is to uncompress it...
Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev