Skip to content

r.out.tiff

Exports a GRASS raster map to a 8/24bit TIFF image file.

r.out.tiff [-pwl] input=name output=name [compression=string] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.out.tiff input=name output=name

grass.script.run_command("r.out.tiff", input, output, compression="none", flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.out.tiff", input="name", output="name")

Parameters

input=name [required]
    Name of input raster map
output=name [required]
    Name for output TIFF file
compression=string
    TIFF file compression
    Allowed values: none, packbit, deflate, lzw
    Default: none
-p
    TIFF Palette output (8bit instead of 24bit).
-w
    Output TIFF world file
-l
    Output Tiled TIFF
--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 input raster map
    Used as: input, raster, name
output : str, required
    Name for output TIFF file
    Used as: output, file, name
compression : str, optional
    TIFF file compression
    Allowed values: none, packbit, deflate, lzw
    Default: none
flags : str, optional
    Allowed values: p, w, l
    p
        TIFF Palette output (8bit instead of 24bit).
    w
        Output TIFF world file
    l
        Output Tiled TIFF
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

Note: this module is superseded by r.out.gdal.

r.out.tiff converts a GRASS raster map to a TIFF raster map. Output may be 8 or 24 bit (TrueColor). Optionally, a TIFF World file compatible with ESRI's and other's products may be output.

The program prompts the user for the name of a GRASS raster map, an output TIFF file, whether an 8 or 24 bit format is desired, and whether or not to create a TIFF world file. Currently only uncompressed, packpit, or deflate TIFF files are written. These output formats are known to be compatible with r.in.tiff.

The output filename will always have the suffix .tif, and the Tiff World file (if requested) .tfw. Any .tif or .tiff suffix (case insensitive) specified in the output filename will be discarded.

When writing with "-l" option, tiles are written at 128x128 pixels. For programs that can utilize tiles, it can help speed up some drawing operations.

The user may adjust region and resolution before export using g.region.

A better choice to export GRASS raster data might be r.out.gdal.

SEE ALSO

g.region, r.in.gdal, r.out.gdal

AUTHOR

Michael Shapiro, U.S. Army Construction Engineering Research Laboratory

GRASS 5.0 team

SOURCE CODE

Available at: r.out.tiff source code (history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819