I'm new to QGIS.

How can I combine multiple raster layers into one layer?

The raster images are of different areas with very little overlap.

The goal is to bring numerous town plats into one project.

  • I tried and tried and tried to merge two (and more) rasters with the gdal_merge.py utility. It seems exactly what I need. Unfortunately is not working. The "help" provides information, but only for people who know python... no error catalogue. I choose 2 .tif (724_239.tif and 724_240.tif), I choose the output file (test.png), I checked "no data value"... And the result is following: ImportError. DLL load failed: the specified procedure could not be found. Can anyone help me? Thank you in advance Anna
    – user14288
    Commented Jan 16, 2013 at 9:12
  • Please i am using QGIS 2.2, In order to merge some Landsat data i used "Raster->miscelaneous->merge "and after all the proceses it gives me this kind of message "The command line is too long " . I need help ,or do not i need to take all the band of each scenes?
    – user52443
    Commented May 20, 2015 at 18:52
  • Welcome to GIS.SE. Please ask a new question, as this is not an answer. Commented May 20, 2015 at 19:11

2 Answers 2


Similar to the merge function is building a virtual raster:

Raster-> Miscellaneous-> Build Virtual Raster (Catalog)

This leverages the GDAL Virtual format (.vrt), which is an XML file that defines how the files are positioned, etc. Virtual rasters can save considerable disk space, and QGIS 'sees' them as a single file. This is very useful for rasters that do not need blended together to create a new image file, i.e. just connected together in a mosaic. Many options beyond the GUI tool exist, if you use the underlying GDAL command line gdalbuilvrt utility.

enter image description here

A .vrt can be quite large. To increase the speed of rendering in QGIS, you can create an external overviews 'sidecar' file.

Raster-> Miscellaneous-> Build overviews (Pyramids)

When using this tool with a .vrt, or with a merged file, I opt for external TIFFs with slight to no JPEG compression, which will create a file with the .ovr extension. The tool leverages GDAL's gdaladdo utility and provides fairly complete coverage of its options.

enter image description here

You may want to read both GDAL utility pages to fully understand what the GUI tools are doing and how you might want to override the options (by clicking the pencil and directly editing the command).

Also, Linfiniti's blog has some useful tidbits on building mosaics, setting options in the Raster tools and raster compression:

Image Mosaicking with GDAL

Specifying options in the QGIS GDAL Tools

GDAL: efficiency of various compression algorithms

  • I can't seem to find the "Raster-> Miscellaneous" menu. I'm using QGIS 1.9.0, and have tried enabling all the plugins.
    – AnnanFay
    Commented Sep 20, 2012 at 15:22
  • @Annan This function requires the GdalTools plugin (comes with QGIS). Check under Plugins->Plugin Manager... to make sure that plugin is active. If it is active, but you still don't see its menus under Raster, you may be missing Python support for your QGIS install.
    – dakcarto
    Commented Sep 20, 2012 at 18:33
  • not sure why it happened, restarted and it started working :) thanks for the help
    – AnnanFay
    Commented Sep 21, 2012 at 13:48
  • I can't find "Raster > Miscellaneous" either, but I can import gdal with the python console. Restarting doesn't help. :( Commented Jul 3, 2013 at 22:16

Use the merge tool:


This essentially does the same thing as the GDAL utility gdal_merge; which is another alternative approach using the command line (or run as a sub-process under Python). BTW I'm using QGIS 1.9.90-Alpha, but this tool has been around for a while so I presume that it is available under 1.7x.

  • 1
    All good points! I will remove my comment in case some follows my advice before reading your answer.....
    – djq
    Commented May 15, 2012 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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