.TH r3.univar 1grass "" "GRASS 8.3.2" "GRASS GIS User's Manual" .SH NAME \fI\fBr3.univar\fR\fR \- Calculates univariate statistics from the non\-null cells of a 3D raster map. .br Statistics include number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum. .SH KEYWORDS raster3d, statistics, univariate statistics .SH SYNOPSIS \fBr3.univar\fR .br \fBr3.univar \-\-help\fR .br \fBr3.univar\fR [\-\fBget\fR] \fBmap\fR=\fIname\fR [\fBzones\fR=\fIname\fR] [\fBoutput\fR=\fIname\fR] [\fBpercentile\fR=\fIfloat\fR[,\fIfloat\fR,...]] [\fBseparator\fR=\fIcharacter\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-g\fR" 4m .br Print the stats in shell script style .IP "\fB\-e\fR" 4m .br Calculate extended statistics .IP "\fB\-t\fR" 4m .br Table output format instead of standard output format .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBmap\fR=\fIname\fR \fB[required]\fR" 4m .br Name of 3D raster map .IP "\fBzones\fR=\fIname\fR" 4m .br 3D Raster map used for zoning, must be of type CELL .IP "\fBoutput\fR=\fIname\fR" 4m .br Name for output file (if omitted or \(dq\-\(dq output to stdout) .IP "\fBpercentile\fR=\fIfloat[,\fIfloat\fR,...]\fR" 4m .br Percentile to calculate (requires extended statistics flag) .br Options: \fI0\-100\fR .br Default: \fI90\fR .IP "\fBseparator\fR=\fIcharacter\fR" 4m .br Field separator .br Special characters: pipe, comma, space, tab, newline .br Default: \fIpipe\fR .SH DESCRIPTION \fIr3.univar\fR calculates the univariate statistics for a 3D raster map. This includes the number of cells counted, minimum and maximum cell values, range, arithmetic mean, population variance, standard deviation, coefficient of variation, and sum. Statistics are calculated separately for every category/zone found in the \fBzones\fR input map if given. If the \fB\-e\fR extended statistics flag is given the 1st quartile, median, 3rd quartile, and given \fBpercentile\fR are calculated. If the \fB\-g\fR flag is given the results are presented in a format suitable for use in a shell script. If the \fB\-t\fR flag is given the results are presented in tabular format with the given field separator. The table can immediately be converted to a vector attribute table which can then be linked to a vector, e.g. the vector that was rasterized to create the \fBzones\fR input raster. .SH NOTES As with most GRASS raster3d modules, \fIr3.univar\fR operates on the voxel array defined by the current 3d region settings, not the original extent and resolution of the input map. See \fIg.region\fR. .PP This module can use large amounts of system memory when the \fB\-e\fR extended statistics flag is used with a very large region setting. If the region is too large the module should exit gracefully with a memory allocation error. Basic statistics can be calculated using any size input region. .SH EXAMPLE Computing univariate statistics of a 3D raster with randomly generated values: .br .nf \fC # define volume g.region n=10 s=0 w=0 e=10 b=0 t=10 res=1 res3=1 \-p3 # generate random map r3.mapcalc \(dqrandom_0_1 = rand(0., 1)\(dq \-s # compute univariate statistics, along with extended statistics r3.univar \-e map=random_0_1 percentile=98 100% total null and non\-null cells: 1000 total null cells: 0 Of the non\-null cells: \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- n: 1000 minimum: 0.00053905 maximum: 0.998322 range: 0.997783 mean: 0.513676 mean of absolute values: 0.513676 standard deviation: 0.289969 variance: 0.0840821 variation coefficient: 56.4498 % sum: 513.676463040334 1st quartile: 0.257654 median (even number of cells): 0.524313 3rd quartile: 0.763637 98th percentile: 0.982924 # script style output, along with extended statistics r3.univar \-ge map=random_0_1 percentile=98 n=1000 null_cells=0 cells=1000 min=0.000539049520323687 max=0.998322037540536 range=0.997782988020212 mean=0.513676463040334 mean_of_abs=0.513676463040334 stddev=0.289969154194666 variance=0.0840821103843701 coeff_var=56.4497646005434 sum=513.676463040334 first_quartile=0.257654 median=0.524313 third_quartile=0.763637 percentile_98=0.982924 \fR .fi .SH TODO To be implemented \fImode, skewness, kurtosis\fR. .SH SEE ALSO \fI g.region, r.univar, r.mode, r.quantile, r.series, r3.stats, r.statistics, v.rast.stats, v.univar \fR .SH AUTHORS Soeren Gebbert .br Code is based on r.univar from .br Hamish Bowman, Otago University, New Zealand .br and Martin Landa .br Zonal loop by Markus Metz .SH SOURCE CODE .PP Available at: r3.univar source code (history) .PP Accessed: Friday Mar 08 07:34:49 2024 .PP Main index | 3D raster index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2024 GRASS Development Team, GRASS GIS 8.3.2 Reference Manual