I'm quite new to GIS format and conversions, so be patient with a newbie. I got stuck on a file conversion and I'm looking for some help this to fix my scripts. I have a big 5 GB tif file with a precision of 5 meters and these features:
Dimensions X: 27176 Y:.49586 Band: 1 Origin 555121,4.4447e+06 Pixel dimension 5,-5 No value:-9999 AREA_OR_POINT=Area STATISTICS_MAXIMUM=2237.2060546875 STATISTICS_MEAN=520.43425935058 STATISTICS_MINIMUM=-2.8499999046326 STATISTICS_STDDEV=429.22835999081 Data type: Float32 +proj=utm +zone=33 +datum=WGS84 +units=m +no_defs Layer extension (original layer projection) 555120.6040000000502914,4196769.7539999997243285 : 691000.6040000000502914,4444699.7539999997243285
I'm getting that each hgt file covers 1 degree lat and 1 degree lon, and has to have a size of 1201x1201.
My intent is to convert this single tif into one or more hgt files. I suppose that given the tif dimensions (X: 27176 Y:.49586) I have first to split into multiple tif files and then convert into multiple hgt file. To do this I'm using GDAL scripts from QGIS:
If I try a direct conversion to hgt I get this warning and error:
Warning 1: The corner coordinates of the source are not properly aligned on plain latitude/longitude boundaries. ERROR 1: Image dimensions should be 1201x1201, 3601x3601 or 1801x3601.
So I defined these scripts below:
gdalwarp -of GTiff -srcnodata 32767 -t_srs "+proj=utm +zone=33 +datum=WGS84" -rcs -order 3 -ts 1201 1201 -multi C:/Users/C012426/Desktop/geocoding/5m_33N/DEM_5m_33N.tif C:/Users/C012426/Desktop/geocoding/5m_33N/DEM_5m_33N_warped.tif
gdal_translate -of SRTMHGT C:/Users/C012426/Desktop/geocoding/5m_33N/DEM_5m_33N_warped.tif C:/Users/C012426/Desktop/geocoding/5m_33N/DEM_5m_33N_warped.hgt
What I get instead is one file only named: N4196770E55.hgt
while I was expecting to get 27176 / 2101 = about 22 hgt files...
What is wrong in my theory and most of all in my scripts ?