1r.mode(1)                     Grass User's Manual                    r.mode(1)
2
3
4

NAME

6       r.mode  - Finds the mode of values in a cover map within areas assigned
7       the same category value in a user-specified base map.
8

KEYWORDS

10       raster, statistics, algebra
11

SYNOPSIS

13       r.mode
14       r.mode --help
15       r.mode base=string cover=string output=string  [--overwrite]   [--help]
16       [--verbose]  [--quiet]  [--ui]
17
18   Flags:
19       --overwrite
20           Allow output files to overwrite existing files
21
22       --help
23           Print usage summary
24
25       --verbose
26           Verbose module output
27
28       --quiet
29           Quiet module output
30
31       --ui
32           Force launching GUI dialog
33
34   Parameters:
35       base=string [required]
36           Base map to be reclassified
37
38       cover=string [required]
39           Coverage map
40
41       output=string [required]
42           Output map
43

DESCRIPTION

45       r.mode  calculates the most frequently occurring value (i. e., mode) of
46       data contained in a cover raster map layer for areas assigned the  same
47       category value in the user-specified base raster map layer. These modes
48       are stored in the new output map layer.
49
50       The output map is actually a reclass of the base map.
51
52       The base parameter defines an existing raster map layer in  the  user’s
53       current  mapset  search path. For each group of cells assigned the same
54       category value in the base map, the mode of the values  assigned  these
55       cells in the cover map will be computed.
56
57       The cover parameter defines an existing raster map layer containing the
58       values to be used to compute the mode within each category of the  base
59       map.
60

NOTES

62       The  user should use the results of r.mode with care.  Since this util‐
63       ity assigns a value to each cell which is based on  global  information
64       (i.e., information at spatial locations other than just the location of
65       the cell itself), the resultant map layer is only  valid  if  the  geo‐
66       graphic  region and mask settings are the same as they were at the time
67       that the result map was created.
68
69       Results are affected by the current region settings and mask.
70

EXAMPLE

72       Mode of K-factor (erosion) for Spearfish fields:
73       g.region raster=fields -p
74       r.mode base=fields cover=soils.Kfactor output=K.by.farm.mode
75       r.univar K.by.farm.mode
76

SEE ALSO

78       g.region,  r.category,  r.clump,  r.describe,   r.mapcalc,   r.mfilter,
79       r.neighbors, r.reclass, r.stats, r.statistics, r.univar
80

AUTHOR

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

SOURCE CODE

85       Available at: r.mode source code (history)
86
87       Main  index  | Raster index | Topics index | Keywords index | Graphical
88       index | Full index
89
90       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
91
92
93
94GRASS 7.8.2                                                          r.mode(1)
Impressum