1r.mode(1) GRASS GIS User's Manual r.mode(1)
2
3
4
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
10 raster, statistics, algebra
11
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
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
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
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
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
82 Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
83
85 Available at: r.mode source code (history)
86
87 Accessed: Saturday Jan 21 20:38:37 2023
88
89 Main index | Raster index | Topics index | Keywords index | Graphical
90 index | Full index
91
92 © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
93
94
95
96GRASS 8.2.1 r.mode(1)