I am merging 3 separate raster DEM's in BIL format. The result of the merge is a black field with a very washed out TIFF. The data is valid because I can probe it with the Identify tool and see the elevations, but the contrast is so low it is difficult to see the shape.

Additionally, the merged layer's Band starts at 0 and not like 172.xxx for the 3 input layers. No amount of fiddling will improve it, except for colorizing, just barely enough to make a clipping mask.

Because the merged band starts at 0 meters, and all of the input layer data lives between 172.3 and 180 or so meters, the contrast is super minimized.

Does anyone know why I might be getting the "0" for black (instead of a real value) for the merged result?

Or perhaps some setting to configure?

Or even what the issue may be, could it be that the input layers do not all start at the same altitude?

Layers Panel

3 input layers, BIL format

merged and colorized


1 Answer 1


If you want to get rid of these values, set the Assigned Specified No Data to ouptut value to be 172 (instead of Not set). This will avoid non set values resulting from the process to be set to 0, but 172 instead. As you can see, your initial raster don't have data in most of the water areas, where the merge algorithm filled the whole resulting rectangle with 0's where there is no altitude data in the water.

enter image description here

You will get something like this with no 0 values in the merged raster:

enter image description here

This means that if you export the merged raster as raw data (the elevation values), it will not contain 0's anymore.

While if you leave the value unset during the merge process, you get 0's as the minimum value in the raster and a greyed-out/flattened rendering by default: enter image description here

Another option if you don't mind having 0's in the merged raster raw data, but just display the color gradient properly, from 172 to the max value, change the Min value in the Merged Layer Style properties as below:

enter image description here

  • Thank you, Kasper, for giving 2 solutions! Jan 28, 2023 at 17:11
  • These rasters are provided in 100mb chunks (lots of nodata water space) where my AOI is a small part of that. After I was merged all three I ended up with a 400.2 mb tif file, which I would then clip. Would it also be valid to clip the individual rasters just inside the polygon (my original shapefile for the AOI) thereby always having data above 0? I would then have a much smaller output file and no zero values, I think. This was my workaround, until you told me about how to fix it. Jan 28, 2023 at 17:22
  • That should work too if you don't need the full extent
    – Kasper
    Jan 28, 2023 at 17:27
  • Thank you, @Kasper, I now have 3 ways to fix this, and very cool how you used my AOI in your answer! Jan 28, 2023 at 17:34

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.