4

I am brand new to QGIS and the world of maps. I have four GeoTiffs inside QGIS. I can merge them just fine using the Merge command, but when I try to use the Mosaic command instead I just end up with a black screen and a new layer which has a Min value of NaN and a really low Max number.

Can anyone tell me why and how to fix that, please? I see someone else had a similar problem in ArcGIS: Why is mosaic of rasters big, black rectangle in ArcGIS Desktop?

I've since followed this guide for calculating statistics and then re-run Mosaic but nothing changed, it's still just blackness.

(The reason I'm using Mosaic and not Merge is because in a bit I'm going to need this command with a 5th image that overlays the other 4, and this is just a simple test.)

enter image description here enter image description here

  • Welcome to GIS SE! As a new user please take the tour to learn about our focused Q&A format. You mention that answers in another Q&A didn't help - what did you try and was there any change or no difference at all? Have you tried anything else? Please edit your question to add any extra info. – Midavalo Mar 26 '17 at 2:45
  • Did you try recalculating your statistics? It seemed to work in the other Q&A for ArcGIS Desktop. – PolyGeo Mar 26 '17 at 3:04
  • I didn't because I don't know what that means, and thought perhaps it was something specific to ArcGIS. I've since followed this guide and then re-run Mosaic and nothing changed, it's still just blackness gis.stackexchange.com/a/151248/94167 – Dunstan Mar 26 '17 at 3:15
  • Please use the edit button beneath your question to revise it with any requested clarifications. – PolyGeo Mar 26 '17 at 3:29
3

TO merge raster layer, you can use the Merge raster layers tool. You can get the tool from Processing Toolbox -> GDAL/OGR -> Miscellaneous -> Merge raster layers.

But before the mosaic process, you need to confirm the data type of the raster images. You can check the raster data type from Layer properties -> Metadata, then go to Data Type. In the example below the data type is 16 bit signed integer. Thus, the output data type should be the same.

enter image description here

Here is an example of of SRTM data before mosaic:

enter image description here

  1. Open the merge tool from Processing Toolbox -> GDAL/OGR -> Miscellaneous -> Merge raster layers
  2. Select the raster images using the ... dots
  3. Select Int16 (in my case), yours might be different depending on the input data type
  4. Define the output file name with extension such as tif for example.

enter image description here

Here is the output mosaic DEM

enter image description here

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.