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

NAME

6       r.cross  - Creates a cross product of the category values from multiple
7       raster map layers.
8

KEYWORDS

10       raster, statistics
11

SYNOPSIS

13       r.cross
14       r.cross --help
15       r.cross  [-z]  input=string[,string,...]   output=name    [--overwrite]
16       [--help]  [--verbose]  [--quiet]  [--ui]
17
18   Flags:
19       -z
20           Non-NULL data only
21
22       --overwrite
23           Allow output files to overwrite existing files
24
25       --help
26           Print usage summary
27
28       --verbose
29           Verbose module output
30
31       --quiet
32           Quiet module output
33
34       --ui
35           Force launching GUI dialog
36
37   Parameters:
38       input=string[,string,...] [required]
39           Names of 2-30 input raster maps
40
41       output=name [required]
42           Name for output raster map
43

DESCRIPTION

45       r.cross creates an output raster map layer representing all unique com‐
46       binations   of   category   values   in   the   raster   input   layers
47       (input=name,name,name,  ...).   At  least  two,  but not more than ten,
48       input map layers must be specified.  The user must also specify a  name
49       to be assigned to the output raster map layer created by r.cross.
50

OPTIONS

52       The  program  will  be  run non-interactively if the user specifies the
53       names of between 2-10 raster map layers be used as input, and the  name
54       of a raster map layer to hold program output.
55
56       With  the  -z  flag  NULL values are not crossed.  This means that if a
57       NULL value occurs in any input data layer, this combination is ignored,
58       even  if other data layers contain non-NULL data.  In the example given
59       below, use of the -z option would cause 3 categories  to  be  generated
60       instead of 5.
61
62       If  the  -z flag is not specified, then map layer combinations in which
63       some values are NULL will be assigned a unique category  value  in  the
64       resulting output map.
65
66       Category  values  in the new output map layer will be the cross-product
67       of the category values from these existing input map layers.
68

EXAMPLE

70       For example, suppose that, using two raster map layers,  the  following
71       combinations occur:
72                 map1   map2
73                 ___________
74                 NULL    1
75                 NULL    2
76                  1      1
77                  1      2
78                  2      4
79       r.cross would produce a new raster map layer with 5 categories:
80                 map1   map2   output
81                 ____________________
82                 NULL    1       0
83                 NULL    2       1
84                  1      1       2
85                  1      2       3
86                  2      4       4
87       Note: The actual category value assigned to a particular combination in
88       the result map layer is dependent on the order in  which  the  combina‐
89       tions  occur  in  the input map layer data and can be considered essen‐
90       tially random.  The example given here is illustrative only.
91

SUPPORT FILES

93       The category file created for the output raster map layer describes the
94       combinations  of  input  map layer category values which generated each
95       category.  In the above example, the category labels would be:
96                 category   category
97                 value      label
98                 ______________________________
99                    0       layer1(0) layer2(1)
100                    1       layer1(0) layer2(2)
101                    2       layer1(1) layer2(1)
102                    3       layer1(1) layer2(2)
103                    4       layer1(2) layer2(4)
104       A random color table is also generated for the output map layer.
105

SEE ALSO

107       r.covar, r.stats
108

AUTHOR

110       Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
111

SOURCE CODE

113       Available at: r.cross source code (history)
114
115       Main index | Raster index | Topics index | Keywords index  |  Graphical
116       index | Full index
117
118       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
119
120
121
122GRASS 7.8.2                                                         r.cross(1)
Impressum