You probably looked at the GDAL Tools (under the raster menu in QGIS) and blissfully ignored that ‘Creation Options’ panel that appears near the bottom of some dialogs. This is definately a power user feature, but a very handy one. In this quick article I will show you how to compress the rasters you create (bits are a valuable resource right?) by adding in some options there.
So this is really a short post because most of it is explained by first reading Rudi’s article on GDAL raster compression. Now you can simply transpose those options into the GDAL tool you are using in QGIS like this:
In the above example, I converted an ASCII grid file to a .tif and compressed the tiff in the process. Here is a little comparison of the before and after file sizes, and the same operation done with no tif compression
1.1M Flood_Design_Depth_Jakarta_geographic.asc 116K Flood_Design_Depth_Jakarta_geographic.tif 1.6M Flood_Design_Depth_Jakarta_geographic-uncompressed.tif
Summary: Its definately worth doing this if ever you are creating raster data in QGIS (and probably one day we should make these options easily available as default profiles in the GUI of QGIS I guess) – the compressed tif is around 1/10th of the original ASCII dataset and the uncompressed tif is actually bigger than the ASCCI grid file! You can set any other valid options you like here – consult the GDAL documentation for the various supported file formats to see further things you can do.