r.pack
Exports a raster map as GRASS specific archive file
r.pack [-c] input=name [output=name] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
r.pack input=name
grass.script.run_command("r.pack", input, output=None, flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
gs.run_command("r.pack", input="name")
grass.tools.Tools.r_pack(input, output=None, flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.r_pack(input="name")
This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.
Parameters
input=name [required]
Name of raster map to pack up
output=name
Name for output file (default is <input>.pack)
-c
Switch the compression off
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
input : str, required
Name of raster map to pack up
Used as: input, raster, name
output : str, optional
Name for output file (default is <input>.pack)
Used as: output, file, name
flags : str, optional
Allowed values: c
c
Switch the compression off
overwrite: bool, optional
Allow output files to overwrite existing files
Default: None
verbose: bool, optional
Verbose module output
Default: None
quiet: bool, optional
Quiet module output
Default: None
superquiet: bool, optional
Very quiet module output
Default: None
input : str, required
Name of raster map to pack up
Used as: input, raster, name
output : str, optional
Name for output file (default is <input>.pack)
Used as: output, file, name
flags : str, optional
Allowed values: c
c
Switch the compression off
overwrite: bool, optional
Allow output files to overwrite existing files
Default: None
verbose: bool, optional
Verbose module output
Default: None
quiet: bool, optional
Quiet module output
Default: None
superquiet: bool, optional
Very quiet module output
Default: None
DESCRIPTION
r.pack collects raster map elements and support files and compressed them using gzip algorithm for copying. The resulting packed file can be afterwards unpacked within a GRASS session by r.unpack. Since the selected raster map is not exported but natively stored, the current region is not respected. Hence r.pack stores the entire raster map.
NOTES
By default, the name of the pack file is determined from the input parameter. Optionally a different name can be given by output parameter. Currently only 2D raster maps are supported.
EXAMPLE
Pack up the entire raster map aspect into aspect.pack file:
r.pack input=aspect
The packed raster map file aspect.pack can afterwards be unpacked by
r.unpack input=aspect.pack
SEE ALSO
r.unpack, r.in.gdal, g.copy, r.proj, v.unpack
AUTHORS
Original Bash script written by Hamish Bowman, Otago University, New
Zealand
Converted to Python and updated for GRASS 7 by Martin Landa, Czech
Technical University in Prague, Czech Republic
SOURCE CODE
Available at: r.pack source code
(history)
Latest change: Friday Aug 08 09:39:19 2025 in commit ed72c71