I have 4 SRTM raster like this: enter image description here

I want to merge them into 1, but when I do this, something like this happens (I only tried it with two of them here):enter image description here

I also tried changing the min and max values that are here both 0 to the min and max values from the two used rasters but it doesn't change. Do you have any idea what's the problem here and what I can do?

Here's the Log file:

QGIS version: 3.8.0-Zanzibar QGIS code revision: 11aff65f10 Qt version: 5.11.2 GDAL version: 2.4.1 GEOS version: 3.7.2-CAPI-1.11.0 b55d2125 PROJ version: Rel. 5.2.0, September 15th, 2018 Processing algorithm… Algorithm 'Merge' starting… Input parameters: { 'DATA_TYPE' : 5, 'INPUT' : ['C:/Users/.../srtm/eu_dem_v11_E30N20/eu_dem_v11_E30N20.TIF','C:/Users/.../srtm/eu_dem_v11_E30N30/eu_dem_v11_E30N30.TIF'], 'NODATA_INPUT' : None, 'NODATA_OUTPUT' : None, 'OPTIONS' : '', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'PCT' : False, 'SEPARATE' : False }

GDAL command: python3 -m gdal_merge -ot Float32 -of GTiff -o C:/Users/.../AppData/Local/Temp/processing_0bf9ee3ec2f548829744a6bd244c96a2/60f16fc4e2394ab496e96b39dd323a73/OUTPUT.tif --optfile C:/Users/.../AppData/Local/Temp/processing_0bf9ee3ec2f548829744a6bd244c96a2/1eb95beda25545199dda413988a6c112/mergeInputFiles.txt GDAL command output: 0Traceback (most recent call last):

File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\runpy.py", line 193, in _run_module_as_main

"main", mod_spec)

File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\runpy.py", line 85, in _run_code

exec(code, run_globals)

File "C:\PROGRA~1\QGIS3~1.8\bin\gdal_merge.py", line 611, in


File "C:\PROGRA~1\QGIS3~1.8\bin\gdal_merge.py", line 596, in main

fi.copy_into(t_fh, band, band, nodata)

File "C:\PROGRA~1\QGIS3~1.8\bin\gdal_merge.py", line 343, in copy_into


File "C:\PROGRA~1\QGIS3~1.8\bin\gdal_merge.py", line 124, in raster_copy


File "C:\PROGRA~1\QGIS3~1.8\bin\gdal_merge.py", line 186, in raster_copy_with_mask

to_write = Numeric.choose(mask_test, (data_src, data_dst))

File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 422, in choose

return _wrapfunc(a, 'choose', choices, out=out, mode=mode)

File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 56, in _wrapfunc

return getattr(obj, method)(*args, **kwds)


Execution completed in 941.61 seconds

  • Have you had a look at the histogramm for the merged layer? Have you made sure you choose the correct layers to merge? Have you changed any presets in the mergedialogue? – Erik Jul 12 '19 at 11:23
  • I chose the correct layers and I didn't change anything in the merge dialogue – DGxA Jul 12 '19 at 11:34

The merge was not successful: towards the end of you log you can read:


I would assume (also looking at the shape of the output "map", and judging from the large amount of time it took) this could be due to a too large region setting. Therefore, I would try setting a smaller output region and checking the required output resolution.

I downloaded two SRTM files, and merged them to take a screenshot which you hopefully find useful as a reference/comparison.


enter image description here


enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.