I'm a student and pretty much new with Qgis.

I'm trying to merge two elevation rasters. They have different resolution (one is a 5mx5m DTM and the other is a 1mx1m DTM) and different extension.

enter image description here

I've clipped the two rasters out of two bigger rasters using Clip with mask.

I've tried to resample the lower resolution raster using gal.warp(reproject) but the all system crashes down every time.

Is there a solution or maybe another way to merge them?

Here are the parameters I run the algorithm with:

enter image description here

I also tried to merge them with no resampling using gdal_merge with senseless results. Here's the gdal_merge parameters:

Heading ##enter image description here

  • 1
    Resampling may have troubles with compressing the whole output as a single block. Try without compression, or by creating a tiled tiff by adding -co TILED=YES.
    – user30184
    Dec 31, 2016 at 11:51

1 Answer 1


Have a look at gdal_merge (http://www.gdal.org/gdal_merge.html). It's a python command so your gdal instance will need have been compiled with python support. It can handle differing resolutions (I believe the output resolution is taken from the first input raster) as long as all input sources are in the same projection. I don't know why gdalwarp is failing on your system but perhaps this is an alternative.

  • I've already tried gdal_merge but the result is a much bigger no values raster :/
    – Mirko
    Dec 31, 2016 at 10:34
  • How did your gdal_merge command look like? Are your both source files in EPSG:32632?
    – user30184
    Dec 31, 2016 at 11:54
  • 1
    Try saving the output to a file and not a temporary file. I have had issues with processes failing in the past where large outputs to temp files crash.
    – scabecks
    Dec 31, 2016 at 14:27
  • 1
    Great! Saving the output to a file worked! But unfortunately I still can't merge the two 1x1 DTMs :/
    – Mirko
    Jan 2, 2017 at 10:26
  • 3
    At the end I succeeded in merging the two rasters (after resampling the 1x1 to 5x5) using GRASS r.patch. Thank you anyway for the advice ;)
    – Mirko
    Jan 10, 2017 at 15:26

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.