4

I am trying to merge rasters in QGIS and want to set a priority order for merging so that the values from the highest priority raster are used in overlap areas (the “FIRST” merge/mosaic method, I believe).

Does anyone know what the merge method is for the QGIS tool under Vector -> Miscellaneous -> Merge? I have not found documentation for the method, but it is clear that it is combining the files in some way other than just taking values from the first loaded raster.

Is the SAGA Mosaic Raster Layers my best alternative?

2

For merging rasters, QGIS use the script gdal_merge (Python script)

gdal_merge.py raster1.tif raster2.tif raster3.tif -o merged.tif

Merge method is for the QGIS tool under Vector -> Miscellaneous -> Merge merge vector layers, as its name indicates

  • So looking at the link you posted, it looks like it is stacking the opposite of what I thought. The explanation of the gdal_merge script says: "The last image in the input line comes out on top of the finished image stack." I had also tried the GDAL merge tool and saw that the outcome was at least visually the same as the QGIS tool, thanks for the confirmation. – KJLC Apr 11 '16 at 4:09
2

The GRASS r.patch from the Processing Toolbox also does the work. I could not manage to merge two rasters due to some file name issues and who knows what else, but with r.patch everything went smooth, specially the multiple selection form the rasters in the layer tree. enter image description here

0

You have gdal_merge in Menu >> Raster >> Miscellaneous >> Merge..

Here is a training page in the QGIS Help file.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.