Bug report #20947

Merging DEM

Added by Matthew Willis over 1 year ago. Updated over 1 year ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Actions
Affected QGIS version:3.4.3 Regression?:No
Operating System:WIndows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:28766

Description

Hi. Since upgrading to the latest version of Qgis I can no longed merge DEM raster layers. I get the following log information. I note it mentions an error "ImportError: No module named _gdal_array" however I have no idea what this is. Thanks for any help.
Processing algorithm…
Algorithm 'Merge' starting…
Input parameters: { 'DATA_TYPE' : 5, 'INPUT' : ['D:/DEM/HawkesburySOUTH0511/DEM/1m/HawkesburySOUTH2011_3106274_56_0002_0002_1m.asc','D:/DEM/HawkesburySOUTH0511/DEM/1m/HawkesburySOUTH2011_3106276_56_0002_0002_1m.asc'], 'NODATA_INPUT' : None, 'NODATA_OUTPUT' : None, 'OPTIONS' : '', 'OUTPUT' : 'C:/Users/User/AppData/Local/Temp/processing_8c2dfe45ca564f77b6f604694185fc32/359e589f2e084114b3b94422f2c9df25/OUTPUT.tif', 'PCT' : False, 'SEPARATE' : False }

GDAL command:
cmd.exe /C gdal_merge.bat -ot Float32 -of GTiff -o C:/Users/User/AppData/Local/Temp/processing_8c2dfe45ca564f77b6f604694185fc32/359e589f2e084114b3b94422f2c9df25/OUTPUT.tif --optfile C:/Users/User/AppData/Local/Temp/processing_8c2dfe45ca564f77b6f604694185fc32\mergeInputFiles.txt
GDAL command output:
0RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa

Traceback (most recent call last):

File "C:\PROGRA~1\QGIS3~1.4\bin\gdal_merge.py", line 611, in <module>

sys.exit(main())

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

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

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

nodata_arg)

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

m_band)

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

t_xsize, t_ysize)

File "C:\PROGRA~1\QGIS3~1.4\apps\Python27\lib\site-packages\osgeo\gdal.py", line 2635, in ReadAsArray

from osgeo import gdalnumeric

File "C:\PROGRA~1\QGIS3~1.4\apps\Python27\lib\site-packages\osgeo\gdalnumeric.py", line 2, in <module>

from osgeo.gdal_array import *

File "C:\PROGRA~1\QGIS3~1.4\apps\Python27\lib\site-packages\osgeo\gdal_array.py", line 17, in <module>

_gdal_array = swig_import_helper()

File "C:\PROGRA~1\QGIS3~1.4\apps\Python27\lib\site-packages\osgeo\gdal_array.py", line 16, in swig_import_helper

return importlib.import_module('_gdal_array')

File "C:\PROGRA~1\QGIS3~1.4\apps\Python27\lib\importlib\__init__.py", line 37, in import_module

import(name)

ImportError: No module named _gdal_array

Execution completed in 1.10 seconds
Results: {'OUTPUT': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/User/AppData/Local/Temp/processing_8c2dfe45ca564f77b6f604694185fc32/359e589f2e084114b3b94422f2c9df25/OUTPUT.tif, 'createOptions': {'fileEncoding': 'System'}}>}

Loading resulting layers


Related issues

Duplicates QGIS Application - Bug report #20895: Raster Merge Failure Closed 2018-12-30

History

#1 Updated by Giovanni Manghi over 1 year ago

  • Status changed from Open to Feedback

Does the gdal_merge command work from the command line (use the osgeo4w shell)?

#2 Updated by Matthew Willis over 1 year ago

Sorry, I have no idea. Im strictly a click and see what happens user. My eyes glaze over and it gets too hard if it doesnt work the way it has before.

#3 Updated by Giovanni Manghi over 1 year ago

Matthew Willis wrote:

Sorry, I have no idea. Im strictly a click and see what happens user. My eyes glaze over and it gets too hard if it doesnt work the way it has before.

for the GDAL tools QGIS is "just" a GUI, we (you) must check first is this command line tools are functional outside the context of QGIS, so just open the OSgeo4W shell and try the command: https://www.gdal.org/gdal_merge.html

#4 Updated by Matthew Willis over 1 year ago

Again i find myself apologizing for my lack of knowledge. I use qgis to do some pretty basic mapping and it works well for what i need. I know only what i need to know to do what i need to do. Whats a OSgeo4w shell and what do I do with it. Sorry very basic user here.

#5 Updated by Jürgen Fischer over 1 year ago

  • Status changed from Feedback to Closed
  • Resolution set to duplicate

#6 Updated by Jürgen Fischer over 1 year ago

Also available in: Atom PDF