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-zero 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 zero data values are not crossed.  This means that if
57       a zero category value occurs in any input data layer,  the  combination
58       is  assigned to category zero in the resulting map layer, even if other
59       data layers contain non-zero data.  In the example given above, use  of
60       the -z option would cause 3 categories to be generated instead of 5.
61
62       If  the  -z flag is not specified, then map layer combinations in which
63       not all category values are zero will be  assigned  a  unique  category
64       value in the resulting map layer.
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                  0      1
75                  0      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                  0      1       1
83                  0      2       2
84                  1      1       3
85                  1      2       4
86                  2      4       5
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                    1       layer1(0) layer2(1)
100                    2       layer1(0) layer2(2)
101                    3       layer1(1) layer2(1)
102                    4       layer1(1) layer2(2)
103                    5       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
112       Last changed: $Date: 2016-01-28 12:21:34 +0100 (Thu, 28 Jan 2016) $
113

SOURCE CODE

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