TransWikia.com

Merging DEMs in QGIS?

Geographic Information Systems Asked on May 13, 2021

Not the first problem I’ve had with DEMs in QGIS 3.4. Trying to merge 6 DEM tiles together into one. Process for this is simple: go to Raster –> Miscellaneous –> Merge. Once in the menu, select which input files and then select a destination output folder. I get an error that reads like this:

Processing algorithm…
Algorithm 'Merge' starting…
Input parameters:
{ 'DATA_TYPE' : 1, 'INPUT' : ['/Users/nickreale/Documents/Micro Atlas/Chiang Mai/Mapping Data:Info/NorthernThailand/ThaiDEM300_0000240000_0012000000.asc','/Users/nickreale/Documents/Micro Atlas/Chiang Mai/Mapping Data:Info/NorthernThailand/ThaiDEM300_0000480000_0012240000.asc'], 'NODATA_INPUT' : None, 'NODATA_OUTPUT' : None, 'OPTIONS' : '', 'OUTPUT' : '/Users/nickreale/Documents/Micro Atlas/Chiang Mai/Mapping Data:Info/NorthernThailand/northai_1.tif', 'PCT' : False, 'SEPARATE' : False }

GDAL command:
gdal_merge.py -ot Int16 -of GTiff -o "/Users/nickreale/Documents/Micro Atlas/Chiang Mai/Mapping Data:Info/NorthernThailand/northai_1.tif" --optfile /var/folders/42/ld6ywf2d5dsb3g3khrd5j1840000gn/T/processing_69556a0719924167983e1a32cdfe7121/mergeInputFiles.txt
GDAL command output:
/bin/sh: gdal_merge.py: command not found

Execution completed in 0.08 seconds
Results:
{'OUTPUT': <QgsProcessingOutputLayerDefinition {'sink':/Users/nickreale/Documents/Micro Atlas/Chiang Mai/Mapping Data:Info/NorthernThailand/northai_1.tif, 'createOptions': {'fileEncoding': 'System'}}>}

Loading resulting layers
The following layers were not correctly generated.<ul><li>/Users/nickreale/Documents/Micro Atlas/Chiang Mai/Mapping Data:Info/NorthernThailand/northai_1.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

I’ve alternatively tried to do this with just two of the 6 DEMs from my folder, thinking that maybe 6 files together were too large.

How do I proceed?

2 Answers

It might be something with your python installation, since you are getting this message:

GDAL command output:
/bin/sh: gdal_merge.py: command not found 

Which means that one python utility from GDAL is not working properly. So you should check which OS you have and try to search with that error in mind.

Perhaps try to install QGIS with OSGeo4W: https://trac.osgeo.org/osgeo4w/

Answered by miln40 on May 13, 2021

It’s possible you have change the system default python by installing another python distribution like Anaconda. It appear that QGIS cannot find the gdal merge.py program that should be in the QGIS program directory. Try to see if the file exists. You may have to reset you default python or QGIS paths.

Another way of doing that is to create a virtual raster. Then load that raster and simple save it a tiff.

Answered by Nicolas Cadieux on May 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP