1

I combined (Merge) 130 DEM maps via QGIS, taking up 3 GB in total. However, the total size of the combined file was 7.4 GB. I'm new to QGIS. It's only been a few weeks. I don't understand why the file size increased so much. Is it possible to set the total size to 3 GB? Both original files and output files are TIFF.

The path I follow is this: ''Raster'' - ''Miscellaneous'' - ''Merge''.

I used ''Float32''. No profile or other option selected.

Input files are 96 DPI, 16 bit, 3601x3601. There is nothing in the properties section of Output File. Output file cannot be read with any program other than QGIS. It appears as a corrupt file.

New contributor
William24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
3
  • 1
    There's a bunch of critical information missing from this Question. How large is the resulting image (rows & cols). How many bits? What compression type? Please Edit the Question.
    – Vince
    Commented Jul 4 at 22:24
  • @Vince I didnt use any compression type. I cant read Output file except QGIS.
    – William24
    Commented Jul 4 at 23:05
  • 1
    The output dimensions determine the image storage requirements -- four tiles nine tile-sizes apart will increase storage 25x (100/4). Choosing to convert 16-bit integer data to 32-bit float seems somewhat arbitrary, and will double the base storage while reducing compressibility (if it even works, which it might not, given the corruption).
    – Vince
    Commented Jul 5 at 0:08

1 Answer 1

5

Most times when raster processing output is a lot larger than the raster inputs, the cause is different compression settings. Namely, the input rasters used significantly stronger compression than the output (the latter may have used none at all).

A comprehensive answer would either

  • Use Layer properties / General / Information from provider / Compression on one or more input layers to understand what compression was applied to them. Then when running the processing (in your case, the merge), set Additional creation options COMPRESS, PREDICTOR, and ZLEVEL or JPEG_QUALITY under Advanced Parameters to duplicate it. (You may need to experiment a bit, especially since the last 2 are not necessarily shown in the input info. Time spent learning about compression options from help is time well spent!)

  • Use gdal_info in the command line to get info on the input rasters, and then use gdal_translate to postprocess your merge (or other) output to compress it the same way

A quick'n'dirty answer for Float32 data would be to just try Additional Creation Options of COMPRESS=DEFLATE, PREDICTOR=3 (this is most useful for Float, versus 2 for integers), and ZLEVEL=9. Try it on a subset first since on a 7.4G file it may take a long time.

A second frequent reason is accidentally changing data type. You write the inputs are "16 bit", which sounds like they're integers. In that case, "Float32" as output will already double file size without adding more information, since there are now 32 bits vs 16 for each point (this is before compression).

Not the answer you're looking for? Browse other questions tagged or ask your own question.