GRASS GIS can export your raster layer in most common (and quite a few less common) data formats using the r.out.gdal function (menu: file – export raster map – common raster formats). Exporting is so simple that you may forget that depending on the output format there are different options to optimise your output raster layer.
The r.out.gdal function uses the gdal utility internally to export your raster file. That means you can use any parameter available in gdal. You can do this via the createopt and metaopt parameters. So, if you are exporting your data, the first step is to consult the individual supported formats pages on the GDAL website to check the possible options.
For example, when you export your raster as geotif, r.out.gdal by default does not compress your output layer. In gdal the parameters to compress your geotif file are compress and predictor, which you can use as follows:
r.out.gdal input=in_image.tif output=out_image.tif format=GTiff type=UInt16 createopt=&quot;compress=lzw,predictor=2&quot;
See this webpage for an explanation. Using these two parameters properly can result in a dramatic reduction of file size. Using the command above gave me a geotif file of 35MB. Exporting the same raster layer without compression gave me a geotif file of 3GB! Of course, your result will vary depending on the nature of your data, but in general it is worth typing in these few extra parameters.
Of course, you can accomplish the same using the r.out.gdal window, see the screenshot of the r.out.gdal window below for an example.