[gdal-dev] converting AAIGrid to SRTM

Bryan Fields Bryan at bryanfields.net
Tue Oct 22 17:03:30 PDT 2019


Greetings,

I have a need for corrected version 4 of the 3 arc second SRTM data.  This is
only available as a AAIGrid format for some reason, not SRTM HGT.

I've pulled the 30x30 degree tiles from here in AAIGrid:
http://srtm.csi.cgiar.org/srtmdata/

gdal_translate requires the input file to match the resolution of the SRTM
output, which is 1201 x 1201 with 1 overlap pixel.

So I broke the 30x30 into 1201 x 1201 AAIGrid files first:

gdal_retile.py -of AAIGrid -v  -ps 1201 1201 -overlap 1 -v -csv csv.csv
-targetDir out cut_n00w090.asc

Then to the out/ directory, and use gdal_translate:

gdal_translate -of SRTMHGT  cut_n00w090_01_01.asc output.hgt

This appears to work and gives a warning of:
Warning 1: Expected output filename is N29W090.HGT

Question 1:
Is there a way to have it auto name the output file?  I'd assume if it knows
what it's suppose to be named, there should be a flag to automatically name it
that.  I can't find that, and need it to convert several thousand of these files.

Question 2:
Is my re-tiling correct and method correct to convert to SRTM 3 arc second HGT
files?

Is there a better way to do any of this?  I did search the archives and was
unable to find much else as the SRTM doesn't look that popular of a format to
process.
-- 
Bryan Fields

727-409-1194 - Voice
http://bryanfields.net


More information about the gdal-dev mailing list