1r.coin(1)                   GRASS GIS User's Manual                  r.coin(1)
2
3
4

NAME

6       r.coin   -  Tabulates the mutual occurrence (coincidence) of categories
7       for two raster map layers.
8

KEYWORDS

10       raster, statistics
11

SYNOPSIS

13       r.coin
14       r.coin --help
15       r.coin [-w] first=name second=name units=string  [--help]   [--verbose]
16       [--quiet]  [--ui]
17
18   Flags:
19       -w
20           Wide report, 132 columns (default: 80)
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       first=name [required]
36           Name of first input raster map
37
38       second=name [required]
39           Name of second input raster map
40
41       units=string [required]
42           Unit of measure
43           c(ells),  p(ercent),  x(percent of category [column]), y(percent of
44           category  [row]),  a(cres),   h(ectares),   k(square   kilometers),
45           m(square miles)
46           Options: c, p, x, y, a, h, k, m
47

DESCRIPTION

49       r.coin  tabulates the mutual occurrence of two raster map layers’ cate‐
50       gories with respect to one another.  This analysis program respects the
51       current geographic region and mask settings.
52
53       r.coin  tabulates  the coincidence of category values among the two map
54       layers and prepares the basic table from which the report is to be cre‐
55       ated.   This  tabulation  is  followed by an indication of how long the
56       coincidence table will be.  If the table is extremely  long,  the  user
57       may  decide that viewing it is not so important after all, and may can‐
58       cel the request at this point.  Assuming  the  user  continues,  r.coin
59       then  allows  the user to choose one of eight units of measure in which
60       the report results can be given.  These units are:
61
62       c
63           cells
64
65       p
66           percent cover of region
67
68       x
69           percent of <map name> category (column)
70
71       y
72           percent of <map name> category (row)
73
74       a
75           acres
76
77       h
78           hectares
79
80       k
81           square kilometers
82
83       m
84           square miles
85
86       Note that three of these options give  results  as  percentage  values:
87       "p"  is  based on the grand total number of cells; "x" is based on only
88       column totals; and "y" is based on only row totals.  Only one  unit  of
89       measure  can  be  selected  per report output.  Type in just one of the
90       letters designating a unit of measure  followed  by  a  <RETURN>.   The
91       report  will  be printed to the screen for review.  After reviewing the
92       report on the screen, the user is given several  options.   The  report
93       may be saved to a file and/or sent to a printer.  If printed, it may be
94       printed with either 80 or 132 columns.  Finally, the user is given  the
95       option  to  rerun  the coincidence tabulation using a different unit of
96       measurement.
97

NOTES

99       It is not a good idea to run r.coin on a map layer  which  has  a  mon‐
100       strous  number  of  categories  (e.g., unreclassed elevation).  Because
101       r.coin reports information for each and every category, it is better to
102       reclassify  those  categories  (using r.reclass) into a more manageable
103       number prior to running r.coin on the reclassed raster map layer.
104

EXAMPLE

106       Below is a sample of tabular output produced by r.coin.  Here, map out‐
107       put is stated in units of square miles.  The report tabulates the coin‐
108       cidence of the Spearfish sample database’s owner and  road  raster  map
109       layers’ categories.  The owner categories in this case refer to whether
110       the land is in private hands (category 1) or is owned by the U.S.  For‐
111       est Service (category 2). The roads map layer categories refer to vari‐
112       ous types of roads (with the exception of  category  value  "0",  which
113       indicates  "no  data";  i.e.,  map  locations at which no roads exist).
114       r.coin does not report category labels. The user should run r.report or
115       r.category to obtain this information.
116
117       The  body  of  the report is arranged in panels. The map layer with the
118       most categories is arranged along the vertical axis of the  table;  the
119       other,  along the horizontal axis.  Each panel has a maximum of 5 cate‐
120       gories (9 if printed) across the top. In addition, the last two columns
121       reflect  a  cross  total of each column for each row.  All of the cate‐
122       gories of the map layer arranged along the vertical axis  are  included
123       in  each  panel.   There is a total at the bottom of each column repre‐
124       senting the sum of all the rows in that column. A second  total  repre‐
125       sents  the  sum of all the non-zero category rows. A cross total (Table
126       Row Total) of all columns for each row appears in a separate panel.
127
128       Note how the following information may  be  obtained  from  the  sample
129       report.
130
131       In  the  Spearfish  data base, in area not owned by the Forest Service,
132       there are 50.63 square miles of land not used for roads. Roads make  up
133       9.27 square miles of land in this area.
134
135       Of  the  total  102.70 square miles in Spearfish, 42.80 square miles is
136       owned by the Forest Service.
137       In total, there are 14.58 square miles of roads.
138
139       There are more category 2 roads outside Forest Service land  (2.92  mi.
140       sq.)  than there are inside Forest land boundaries (0.72 mi. sq.).
141
142       Following is a sample report.
143       +------------------------------------------------------------+
144       |                    COINCIDENCE TABULATION REPORT           |
145       |------------------------------------------------------------|
146       |Location: spearfish    Mapset: PERMANENT   Date: Wed Jun 1  |
147       |                                                            |
148       | Layer 1: owner          -- Ownership                       |
149       | Layer 2: roads          -- Roads                           |
150       | Mask:    none                                              |
151       |                                                            |
152       | Units:   square miles                                      |
153       |------------------------------------------------------------|
154       | Window:                North: 4928000.00                   |
155       |          West: 590000.00               East: 609000.00     |
156       |                        South: 4914000.00                   |
157       +------------------------------------------------------------+
158       Panel #1 of 1
159       +--------------------------------------------------------+
160       |        | owner                 |    Panel Row Total    |
161       |   cat# |         1 |         2 |   w cat 0 | w/o cat 0 |
162       |--------------------------------------------------------|
163       |r     0 |     50.63 |     37.49 |     88.12 |     88.12 |
164       |o     1 |      1.53 |      0.68 |      2.21 |      2.21 |
165       |a     2 |      2.92 |      0.72 |      3.64 |      3.64 |
166       |d     3 |      3.97 |      2.57 |      6.54 |      6.54 |
167       |s     4 |      0.65 |      1.36 |      2.00 |      2.00 |
168       |      5 |      0.19 |      0.00 |      0.19 |      0.19 |
169       |--------------------------------------------------------|
170       |Total   |           |           |           |           |
171       |with 0  |     59.90 |     42.80 |    102.70 |    102.70 |
172       |--------------------------------------------------------|
173       |w/o 0   |      9.27 |      5.32 |     14.58 |     14.58 |
174       +--------------------------------------------------------+
175       +--------------------------------+
176       |        |    Table Row Total    |
177       |   cat# |   w cat 0 | w/o cat 0 |
178       |--------------------------------|
179       |r     0 |     88.12 |     88.12 |
180       |o     1 |      2.21 |      2.21 |
181       |a     2 |      3.64 |      3.64 |
182       |d     3 |      6.54 |      6.54 |
183       |s     4 |      2.00 |      2.00 |
184       |      5 |      0.19 |      0.19 |
185       |--------------------------------|
186       |Total   |           |           |
187       |with 0  |    102.70 |    102.70 |
188       |--------------------------------|
189       |w/o 0   |     14.58 |     14.58 |
190       +--------------------------------+
191
192       r.coin  calculates  the coincidence of two raster map layers.  Although
193       r.coin allows the user to rerun the report using different units, it is
194       not  possible to simply rerun the report with different map layers.  In
195       order to choose new map layers, it is necessary to rerun r.coin.
196

SEE ALSO

198        g.region, r.category, r.describe, r.reclass, r.report, r.stats
199

AUTHORS

201       Michael O’Shea,
202       Michael Shapiro,
203       U.S. Army Construction Engineering Research Laboratory
204

SOURCE CODE

206       Available at: r.coin source code (history)
207
208       Main index | Raster index | Topics index | Keywords index  |  Graphical
209       index | Full index
210
211       © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
212
213
214
215GRASS 7.8.5                                                          r.coin(1)
Impressum