t.rast3d.univar
Calculates univariate statistics from the non-null cells for each registered 3D raster map of a space time 3D raster dataset.
t.rast3d.univar [-es] input=name [zones=name] [nprocs=integer] [output=name] [percentile=float [,float,...]] [where=sql_query] [region_relation=string] [separator=character] format=name [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
t.rast3d.univar input=name format=plain
grass.tools.Tools.t_rast3d_univar(input, zones=None, nprocs=0, output=None, percentile=None, where=None, region_relation=None, separator="", format="plain", flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.t_rast3d_univar(input="name", format="json")
This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.
grass.script.parse_command("t.rast3d.univar", input, zones=None, nprocs=0, output=None, percentile=None, where=None, region_relation=None, separator="", format="plain", flags=None, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
gs.parse_command("t.rast3d.univar", input="name", format="json")
Parameters
input=name [required]
Name of the input space time raster3d dataset
zones=name
Raster map with zones to compute statistics for
3D raster map with zones
nprocs=integer
Number of threads for parallel computing
0: use OpenMP default; >0: use nprocs; <0: use MAX-nprocs
Default: 0
output=name
Name for output file
percentile=float [,float,...]
Percentile to calculate (requires extended statistics flag)
Allowed values: 0-100
where=sql_query
WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
Example: start_time > '2001-01-01 12:30:00'
region_relation=string
Process only maps with this spatial relation to the current computational region
Allowed values: overlaps, contains, is_contained
separator=character
Field separator character between the output columns
Special characters: pipe, comma, space, tab, newline
format=name [required]
Output format
Allowed values: plain, json, csv
Default: plain
plain: Plain text output
json: JSON (JavaScript Object Notation)
csv: CSV (Comma Separated Values)
-e
Calculate extended statistics
-s
Suppress printing of column names
--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 the input space time raster3d dataset
Used as: input, str3ds, name
zones : str, optional
Raster map with zones to compute statistics for
3D raster map with zones
Used as: input, raster_3d, name
nprocs : int, optional
Number of threads for parallel computing
0: use OpenMP default; >0: use nprocs; <0: use MAX-nprocs
Default: 0
output : str, optional
Name for output file
Used as: output, file, name
percentile : float | list[float] | str, optional
Percentile to calculate (requires extended statistics flag)
Allowed values: 0-100
where : str, optional
WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
Example: start_time > '2001-01-01 12:30:00'
Used as: sql_query
region_relation : str, optional
Process only maps with this spatial relation to the current computational region
Allowed values: overlaps, contains, is_contained
separator : str, optional
Field separator character between the output columns
Special characters: pipe, comma, space, tab, newline
Used as: input, separator, character
format : str, required
Output format
Used as: name
Allowed values: plain, json, csv
plain: Plain text output
json: JSON (JavaScript Object Notation)
csv: CSV (Comma Separated Values)
Default: plain
flags : str, optional
Allowed values: e, s
e
Calculate extended statistics
s
Suppress printing of column names
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
Returns:
result : grass.tools.support.ToolResult | None
If the tool produces text as standard output, a ToolResult object will be returned. Otherwise, None will be returned.
Raises:
grass.tools.ToolError: When the tool ended with an error.
input : str, required
Name of the input space time raster3d dataset
Used as: input, str3ds, name
zones : str, optional
Raster map with zones to compute statistics for
3D raster map with zones
Used as: input, raster_3d, name
nprocs : int, optional
Number of threads for parallel computing
0: use OpenMP default; >0: use nprocs; <0: use MAX-nprocs
Default: 0
output : str, optional
Name for output file
Used as: output, file, name
percentile : float | list[float] | str, optional
Percentile to calculate (requires extended statistics flag)
Allowed values: 0-100
where : str, optional
WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
Example: start_time > '2001-01-01 12:30:00'
Used as: sql_query
region_relation : str, optional
Process only maps with this spatial relation to the current computational region
Allowed values: overlaps, contains, is_contained
separator : str, optional
Field separator character between the output columns
Special characters: pipe, comma, space, tab, newline
Used as: input, separator, character
format : str, required
Output format
Used as: name
Allowed values: plain, json, csv
plain: Plain text output
json: JSON (JavaScript Object Notation)
csv: CSV (Comma Separated Values)
Default: plain
flags : str, optional
Allowed values: e, s
e
Calculate extended statistics
s
Suppress printing of column names
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
t.rast3d.univar provides the same functionality as t.rast.univar, the only difference is the 3D raster map layer metadata. Please refer to the manual page of t.rast.univar for documentation and examples.
SEE ALSO
t.rast.univar, t.create, t.info
AUTHOR
Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
Stefan Blumentrath (support for zones)
SOURCE CODE
Available at: t.rast3d.univar source code
(history)
Latest change: Tuesday Jun 23 10:24:48 2026 in commit fdb189e