2

I have 198 tiles of a DEM from which I want to extract contour lines, but doing the operation 198 times is ungainly.

I tried SAGA's Merge raster layers, but it stops into this error:

Oooops! The following output layers could not be open

Merged Grid: C:\Users\USER\AppData\Local\Temp\processing\9833d17c1e3845ddbd7717b1c3084920\MERGED.tif

The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm

Checking the log information might help you see why those layers were not created as expected

This algorithm requires SAGA to be run. A test to check if SAGA is correctly installed and configured in your system has been performed, with the following result:

SAGA seems to be correctly installed and configured

The Python error in the message log says:

2016-05-22T17:59:45 1   Traceback (most recent call last):
          File "C:/Users/USER/.qgis2/python/plugins\processing\gui\ProcessingToolbox.py", line 191, in executeAlgorithm
            dlg = ParametersDialog(alg)
          File "C:/Users/USER/.qgis2/python/plugins\processing\gui\ParametersDialog.py", line 42, in __init__
            AlgorithmExecutionDialog.__init__(self, alg, self.scrollArea)
          File "C:/Users/USER/.qgis2/python/plugins\processing\gui\AlgorithmExecutionDialog.py", line 110, in __init__
            isText, help = self.alg.help()
          File "C:/Users/USER/.qgis2/python/plugins\processing\algs\saga\SagaAlgorithm.py", line 510, in help
            name + '.rst'))
          File "C:/Users/USER/.qgis2/python/plugins\processing\gui\Help2Html.py", line 55, in getHtmlFromRstFile
            print s
        IOError: [Errno 9] Bad file descriptor

Similarly, trying GDAL > Miscellaneous > Merge also results in a Python crash, with no log.

An older question seemed to have a similar error, but was fixed by manually downloading the most recent SAGA. I did this, and the error did not change.

  • Try to download QGIS 2.8.9 (LTR) and check if this version can solve your problem. – ahmadhanb May 23 '16 at 1:30
  • @ahmadhanb Exact same error appears, Python log says the following: pastebin.com/TBCp2U3x – Nelg May 23 '16 at 17:15
  • Try to merge the raster images on several batches, instead of putting the 198 raster files one time. – ahmadhanb May 24 '16 at 0:45
  • @ahmadhanb Tried with any number of images, 2 or more. Also with almost all permutations of the options, which I don't quite understand though. Greeted with the same error each time. Does the plugin really stitch multiple rasters together side by side? I get the feeling that the merging fails because there are no overlapping pixels, to which the options would hint. – Nelg May 24 '16 at 14:11
  • Are you sure that you are using the correct tool? SAGA doesn't have Merge Raster Layer, it has Mosaic raster layers. Merge raster layers is located under GDAL > Miscellaneous, as you stated in your question. Unless you tried both, Merge ans Mosaic and both gave you the same error. In this case it might be a bug in SAGA. – ahmadhanb May 25 '16 at 1:23

Your Answer

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

Browse other questions tagged or ask your own question.