1r.mode(1) Grass 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
11
13 r.mode
14 r.mode help
15 r.mode base=string cover=string output=string [--overwrite] [--ver‐
16 bose] [--quiet]
17
18 Flags:
19 --overwrite
20 Allow output files to overwrite existing files
21
22 --verbose
23 Verbose module output
24
25 --quiet
26 Quiet module output
27
28 Parameters:
29 base=string
30 Base map to be reclassified
31
32 cover=string
33 Coverage map
34
35 output=string
36 Output map
37
39 r.mode calculates the most frequently occurring value (i. e., mode) of
40 data contained in a cover raster map layer for areas assigned the same
41 category value in the user-specified base raster map layer. These modes
42 are stored in the new output map layer.
43
44 The output map is actually a reclass of the base map.
45
46 The base parameter defines an existing raster map layer in the user's
47 current mapset search path. For each group of cells assigned the same
48 category value in the base map, the mode of the values assigned these
49 cells in the cover map will be computed.
50
51 The cover parameter defines an existing raster map layer containing the
52 values to be used to compute the mode within each category of the base
53 map.
54
56 The user should use the results of r.mode with care. Since this util‐
57 ity assigns a value to each cell which is based on global information
58 (i.e., information at spatial locations other than just the location of
59 the cell itself), the resultant map layer is only valid if the geo‐
60 graphic region and mask settings are the same as they were at the time
61 that the result map was created.
62
63 Results are affected by the current region settings and mask.
64
66 Mode of K-factor (erosion) for Spearfish fields:
67 g.region rast=fields -p
68 r.mode base=fields cover=soils.Kfactor output=K.by.farm.mode
69 r.univar K.by.farm.mode
70
71
73 g.region, r.average, r.category, r.clump, r.describe, r.mapcalc,
74 r.median, r.mfilter, r.neighbors, r.reclass, r.stats, r.statistics,
75 r.univar
76
78 Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
79
80 Last changed: $Date: 2007-10-10 10:01:00 +0200 (Wed, 10 Oct 2007) $
81
82 Full index
83
84 © 2003-2008 GRASS Development Team
85
86
87
88GRASS 6.3.0 r.mode(1)