I am using gdalogr:merge
in Python console in order to merge to rasters (.tif) But I don't really understand the first parameter, where I have to put two variables.
I get the following error:
Unable to execute algorithm
Wrong parameter value: ras1; ras2None
import processing
from processing.core.Processing import Processing
from qgis.core import *
from qgis.gui import *
ras1 =QgsRasterLayer("H:/pyQGIS/DATA_U6/mdt_483.tif","MDT483")
ras2 = QgsRasterLayer("H:/pyQGIS/DATA_U6/mdt_508.tif", "MDT508")
QgsMapLayerRegistry.instance().addMapLayers([ras1])
QgsMapLayerRegistry.instance().addMapLayers([ras2])
merj = processing.runalg("gdalogr:merge",'ras1; ras2', False, False, 4,"H:/pyQGIS/DATA_U6/mdt_mosaico.tif")
print(repr(merj))