I am new to QGIS (former Arc user) and having trouble with the raster merge tool.

I am merging 7 tiles of SRTM arc 1 data to cover a province in eastern Ecuador. Data is resulting in large areas of total black areas. I've done quite a bit of research on GIS stack exchange to troubleshoot: - I've made sure my output data type is consisent with input (int16) - I've tried merging with both projected and unprojected data - I've tried some general tinkering around with the style settings on each DEM - I've tried the tool in both QGIS 2.18 and 3.0

At this point, I'm fairly positive it has to do with the large variations in my minimum and maximum values in each tile -- I am working with an area that goes from high elevation of the Sierra mountain range down into the Amazon basin, so my real range is between 127 and 6218. My output comes out 0-6218, which is close enough to the real range (127-6218) that adjustment of the min/max of the output DEM to reflect real range doesn't do much. Extremely changing the min/max values in the final output DEM allows me to see data where there is black, but simultaneously "erases" data at the other end of the spectrum (If the high elevation data appears, the low elevation data disappears, and vice versa).

I do not see any parameter to adjust in the merge tool to fix this. Anyone have any ideas?? Below are some screenshots of original data, merge parameters, and output in order:

Original DEM data

Merge parameters

Output screenshot

  • I'm having a hard time understanding what your problem is. If you want display consistency, you can do a simple gdalbuildvrt on your tiles, then pull the vrt file into QGIS and adjust your display parameters. As for your "black" tile, what happens if you set its display max/min to the same as one of its neighbors? It should appear seamless, assuming your tiles don't have edge effects. – Jon Apr 17 '18 at 15:53
  • Hi - I'm looking into the gdalbuildvrt option (again, need to do some research on what that is because i'm new to qgis). But just to clarify, I'm not worried about the lowerleft black tile, which is no-data - I will clip that out). My concern is the display of the eastern tiles, which appear almost entirely obscured. – Ana Apr 17 '18 at 18:11
  • I think that's just a problem with applying a linear display scheme to a dataset with a large difference between max and min. You can go into your Display options and play with different ranges to get the visualization you want. (Style->Render Type) I suggested first building a vrt because then you only have to change a single layer instead of each of the tiles individually. – Jon Apr 17 '18 at 18:20
  • Hi Jon, I'm a bit confused by how building a vrt would resolve the display scheme. You mention that it might be more efficient having to only change the display of one tile versus many, but with the merged raster (last screenshot) too there is only one file to play with. I think my main problem is finding a way to adjust display so that extremely variable elevations are simultaneously visible (whether that be in real raster or vrt). Perhaps it is just not possible to visually represent that elevation change in a DEM across grayscale? – Ana Apr 17 '18 at 19:17
  • You are correct, I didn't understand that you were working with the merged tiff. (BTW, in the future a vrt instead of a merged tiff will save you disk space and time.) I believe the only way you can resolve your display issue is to change your "Render type" under "Style" which you see when you look at the Layer Properties. You can manually set the intervals and the corresponding colors that way (e.g. select Paletted or Singleband Pseudocolor). Another trick you could use is to log-transform your data with the Raster Calculator. Really depends on what you're using the display for... – Jon Apr 17 '18 at 19:26

Your Answer

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

Browse other questions tagged or ask your own question.