3

I have brought in multiple TIFF (raster) files into QGIS and want to combine them into one file. I tried this by going to Raster> Misc.> Merge. When doing this the output file comes out as gray and black and I want to keep the colors of my TIFF files.

Colour topographic TIFF image of Norwich UK

  • 1
    have you tried using gdal_merge.py from the command line? – dmci Jun 8 '17 at 21:53
3

You need to use Merge tool from Processing toolbox -> GDAL/OGR -> Miscellaneous -> Merge it has the option to Grab pseudocolor table from first layer that you need to check, as you can see below:

enter image description here

Do not forget to choose a proper Output raster type that match the raster type of the input data, or any type that is close to input raster data.

For example, I have two topographic map sheets with 8 bit unsigned integer, but I don't have the same pixel type, so I chose UInt16 which is 16 bit unsigned integer.

Input:

enter image description here

Here is the output after running the Merge tool:

enter image description here

  • Thank You, it worked. Now how can I, if possible, remove that black line in between the images I merge. – Shub Jun 9 '17 at 12:00
  • Also, with my TIFFs when I merge they change color to grayscale. Not sure why. – Shub Jun 9 '17 at 12:12
  • 1
    @Jhunt9 make sure that pixel type in settings in the merge tool matches input raster pixel type. – ahmadhanb Jun 9 '17 at 14:08
  • How do I check what raster pixel type my inputs are? Are you talking about the output raster type? The one that defaults to Float32? – Shub Jun 9 '17 at 14:14
  • 1
    Go to the right-click the raster layer in the table of content -> layer properties -> metadata and scroll down until you see pixel type and check what type from there. – ahmadhanb Jun 9 '17 at 14:54
1

Try the Clipper tool. Raster->Extraction->Clipper

Set the extent to cover the area you want to combine.

  • I can only select one input file when I do this and I want to select all of the files and combine them together. – Shub Jun 8 '17 at 19:28
  • 1
    Yes that is correct. I apparently misread your question. – Pooneil Jun 9 '17 at 11:48

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.