Invalid SRTM zips over the Caspian sea
If you're working with SRTM tiles in
.hgt.zip format you might have found some files that can't be processed by gdal (and therefore can't be processed by Open Topo Data):
ERROR 4: `N44E049.SRTMGL1.hgt.zip' not recognized as a supported file format. gdalinfo failed - unable to open 'N44E049.SRTMGL1.hgt.zip'.
There are 16 tiles with this issue
N37E051 N37E052 N38E050 N38E051 N38E052 N39E050 N39E051 N40E051 N41E050 N41E051 N42E049 N42E050 N43E048 N43E049 N44E048 N44E049
all of which cover no-land areas of the Caspian Sea
Invalid tiles shown in pink. Basemap is Bing aerial imagery.
and have a constant elevation of -29m
gdalinfo -mm N44E049.hgt | grep Min
What's the issue
.hgt.zip files are a zip archive containing a file named like
unzip -l N37E011.SRTMGL1.hgt.zip
Archive: N37E011.SRTMGL1.hgt.zip Length Date Time Name --------- ---------- ----- ---- 25934402 2012-10-08 15:44 N37E011.hgt --------- ------- 25934402 1 file
But the zips over the Caspian sea contain a file named like
unzip -l N44E049.SRTMGL1.hgt.zip
Archive: N44E049.SRTMGL1.hgt.zip Length Date Time Name --------- ---------- ----- ---- 25934402 2015-08-10 10:24 N44E049.SRTMGL1.hgt --------- ------- 25934402 1 file
and unfortunately while GDAL will read
NxxEyyy[.something].hgt.zip files just fine, the
.hgt file inside the
.zip file must be named
Because these tiles all have a constant value (the elevation of the Caspian sea, which is about -29m) and weren't even included in the previous version of SRTM, I'm guessing the files went through a different pipeline to the rest of the datasets. I'm not sure if this is a bug with gdal or the dataset itself.
How to fix these files
The 16 invalid tiles can be fixed by renaming the
.hgt file contained within:
unzip N44E049.SRTMGL1.hgt.zip mv N44E049.SRTMGL1.hgt N44E049.hgt zip N44E049.SRTMGL1.repacked.hgt.zip N44E049.hgt
Which datasets are affected
Both the 30m and 90m resolutions of SRTM version 3 hosted on usgs.gov/MEASURES are affected.
Version 2 of SRTM just excludes the 16 tiles over the Caspian sea:
The Cigar version 4.1 of SRTM has the correct elevation.