[GIS] Why can’t I merge DEM rasters in QGIS 3.10

mergeqgisraster

I recently downloaded QGIS 3.10 and am trying to merge several raster DEM .tif files via the Ratser tab > miscellaneous > merge. I tried several output data types like Float32, Int16, and Byte, and high and low compression profiles but they all yield the same error message: "The following layers were not correctly generated (insert layer name). You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm." I am not sure where to find this information or what it means. Do I need to install a plugin to run it? What can I do to make this command run successfully?

Best Answer

May be different reasons about why you can't merge them. Most of them can be deducted from the complete error message, not just the end part.

About the end part, it is just saying that you can find that log in the Log Messages panel (View ~> Panels ~> Log Messages), generally in the Proccesing Tab. But the text in the Log tab of the processing window is the same as the text logged in the Proccesing tab of the Log Messages panel.

For instance, check this Log:

QGIS version: 3.10.3-A Coruña
QGIS code revision: 0e1f846438
Qt version: 5.11.2
GDAL version: 3.0.4
GEOS version: 3.8.0-CAPI-1.13.1 
PROJ version: Rel. 6.3.1, February 10th, 2020
Processing algorithm…
Algorithm 'Merge' starting…
Input parameters:
{ 'DATA_TYPE' : 5, 'EXTRA' : '', 'INPUT' : '', '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/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/0dcfa065d9f440fcb971f60d43f55e01/OUTPUT.tif --optfile C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/47fa46a83f0647018e0d6704bab4c501/mergeInputFiles.txt
GDAL command output:
No input files selected.

Usage: gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*

[-ps pixelsize_x pixelsize_y] [-tap] [-separate] [-q] [-v] [-pct]

[-ul_lr ulx uly lrx lry] [-init "value [value...]"]

[-n nodata_value] [-a_nodata output_nodata_value]

[-ot datatype] [-createonly] input_files

[--help-general]



Execution completed in 0.43 seconds
Results:
{'OUTPUT': 'C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/0dcfa065d9f440fcb971f60d43f55e01/OUTPUT.tif'}

Loading resulting layers
The following layers were not correctly generated.<ul><li>C:/Users/Gabriel/AppData/Local/Temp/processing_7b398423d55540609fc7426a5b406a0b/processing_ef4d9c14a2ca4bf08bd09c0d1c53d5e4/0dcfa065d9f440fcb971f60d43f55e01/OUTPUT.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

It have the same last part, but the error is described before, at:

GDAL command output:
No input files selected.

I have just opened the process and press Run without selecting any input layer ...

Related Question