This is an old revision of the document!
This page is dedicated to sparse and casual tricks with some common GFOSS tools.
This command works with relatively recent Gdal versions:
gdal_merge.py -o multiband.tif -separate band1.tif band2.tif band3.tif
Just use the builtin computing region facility, it will use a nearest neighbor interpolation for this purpose:
g.region rast=original_map -p g.region res=<new> r.mapcalc "new_map=original_map"
A similar trick can be used to cut a portion of the original map, apply a mask, etc. A more capable module for those application is r.resamp.interp
which can be used instead of r.mapcalc
to peform bilinear and bicubic interpolation for the grid.