I'm currently struggling on trying to combine several .hgt files with different software. I can get the 4 tiles into any kind of software but my issue is exporting the file back to .hgt file.
I've tried using VTBuilder, which allowed me to easily blend the 4 tiles together. I made sure the projection was indeed to WGS 84 and the column and rows were at 1201 as a SRTM should be (as I have got 4 together perhaps I should have double them to 2402×2402?).
I then exported the data as .bt file from VTBuilder and imported it into Landserf, having seen information that it could write .hgt, which doesn't seem to be the case. I supposedly found a workaround by saving the file as a .bil and changing the file name manually to .hgt… It doesn't work as it should.
To give you all the context, I am working with grasshopper using the plugin elk. The grasshopper component cannot read 4x .hgt files and is asking for only one file larger than the area I am looking at ( which is 24.6420 to 25.1627; 94.8683 to 95.2968) hence why I am trying to combine them all together. I have access to QGIS and the software mentioned before.
I cannot seem to find anybody that has raised this issue before on the forum or online for that matter.
Best Answer
(Perhaps grasshopper/elk also accepts
IMG
andGeoTiff
formats, anyway...)Not a QGIS answer; my choice is SAGA, currently version 7.
Mosaicking
hgt
files to SAGA window.Tools
window, go toGrid > Tools
and activate Mosaicking tool.>>Grids
. Click[...]
button and select all your grids. [Edit] ChooseNearest Neighbour
for resampling method. Then click on[Apply]
button and then[Execute]
. You'll have newly merged raster (grid).Export hgt
hgt
. In theTools
window, go toImport/Export > GDAL/OGR
and activate Export Raster tool.>>Grid(s)
. Give a new filename inFile
(file extension should be.hgt
. In theFormat
selection, choose ESRI.hdr Labelled as the output format. Then click on[Apply]
button and then[Execute]
button. Now you have merged hgt file.In this export process, SAGA is using a GDAL driver for ESRI BIL format. This is sometimes tricky (depends on data), but would work in most cases.