3
<em>r.coin</em> tabulates the mutual occurrence of two
4
raster map layers' categories with respect to one another.
5
This analysis program respects the current geographic
6
region and mask settings.
11
tabulates the coincidence of category values among the two
12
map layers and prepares the basic table from which the
13
report is to be created. This tabulation is followed by an
14
indication of how long the coincidence table will be. If
15
the table is extremely long, the user may decide that
16
viewing it is not so important after all, and may cancel
17
the request at this point. Assuming the user continues,
18
<em>r.coin</em> then allows the user to choose one of eight
19
units of measure in which the report results can be given.
25
<dt><em>c</em> <dd>cells
26
<dt><em>p</em> <dd>percent cover of region
27
<dt><em>x</em> <dd>percent of <map name> category (column)
28
<dt><em>y</em> <dd>percent of <map name> category (row)
29
<dt><em>a</em> <dd>acres
30
<dt><em>h</em> <dd>hectares
31
<dt><em>k</em> <dd>square kilometers
32
<dt><em>m</em> <dd>square miles
37
Note that three of these options give results as percentage
38
values: "p" is based on the grand total number of cells;
39
"x" is based on only column totals; and "y" is based on
40
only row totals. Only one unit of measure can be selected
41
per report output. Type in just one of the letters
42
designating a unit of measure followed by a
43
<RETURN>. The report will be printed to the screen
44
for review. After reviewing the report on the screen, the
45
user is given several options. The report may be saved to
46
a file and/or sent to a printer. If printed, it may be
47
printed with either 80 or 132 columns. Finally, the user
48
is given the option to rerun the coincidence tabulation
49
using a different unit of measurement.
55
It is <b>not</b> a good idea to run <em>r.coin</em> on a
56
map layer which has a monstrous number of categories (e.g.,
57
unreclassed elevation). Because <em>r.coin</em> reports
58
information for each and every category, it is better to
59
reclassify those categories (using <em>r.reclass</em>)
60
into a more manageable number prior to running
61
<em>r.coin</em> on the reclassed raster map layer.
67
Below is a sample of tabular output produced by
68
<em>r.coin</em>. Here, map output is stated in units of
69
square miles. The report tabulates the coincidence of the
70
Spearfish sample database's <em>owner</em> and
71
<em>road</em> raster map layers' categories. The
72
<em>owner</em> categories in this case refer to whether the
73
land is in private hands (category 1) or is owned by the
74
U.S. Forest Service (category 2). The <em>roads</em> map
75
layer categories refer to various types of roads (with the
76
exception of category value "0", which indicates "no data";
77
i.e., map locations at which no roads exist).
78
<em>r.coin</em> does not report category labels. The user
80
<em><a href="r.report.html">r.report</a></em> or
81
<em><a href="r.category.html">r.category</a></em>
82
to obtain this information.
86
The body of the report is arranged in panels. The map layer
87
with the most categories is arranged along the vertical
88
axis of the table; the other, along the horizontal axis.
89
Each panel has a maximum of 5 categories (9 if printed)
90
across the top. In addition, the last two columns reflect a
91
cross total of each column for each row. All of the
92
categories of the map layer arranged along the vertical
93
axis are included in each panel. There is a total at the
94
bottom of each column representing the sum of all the rows
95
in that column. A second total represents the sum of all
96
the non-zero category rows. A cross total (Table Row Total)
97
of all columns for each row appears in a separate panel.
101
Note how the following information may be obtained from the sample report.
105
In the Spearfish data base, in area not owned by the Forest Service, there
106
are 50.63 square miles of land not used for roads. Roads make up 9.27 square
107
miles of land in this area.
109
Of the total 102.70 square miles in Spearfish, 42.80
110
square miles is owned by the Forest Service.
112
In total, there are 14.58 square miles of roads.
114
There are more category 2 roads outside Forest Service land
116
than there are inside Forest land boundaries (0.72 mi. sq.).
119
Following is a sample report.
122
+------------------------------------------------------------+
123
| COINCIDENCE TABULATION REPORT |
124
|------------------------------------------------------------|
125
|Location: spearfish Mapset: PERMANENT Date: Wed Jun 1 |
127
| Layer 1: owner -- Ownership |
128
| Layer 2: roads -- Roads |
131
| Units: square miles |
132
|------------------------------------------------------------|
133
| Window: North: 4928000.00 |
134
| West: 590000.00 East: 609000.00 |
135
| South: 4914000.00 |
136
+------------------------------------------------------------+
139
+--------------------------------------------------------+
140
| | owner | Panel Row Total |
141
| cat# | 1 | 2 | w cat 0 | w/o cat 0 |
142
|--------------------------------------------------------|
143
|r 0 | 50.63 | 37.49 | 88.12 | 88.12 |
144
|o 1 | 1.53 | 0.68 | 2.21 | 2.21 |
145
|a 2 | 2.92 | 0.72 | 3.64 | 3.64 |
146
|d 3 | 3.97 | 2.57 | 6.54 | 6.54 |
147
|s 4 | 0.65 | 1.36 | 2.00 | 2.00 |
148
| 5 | 0.19 | 0.00 | 0.19 | 0.19 |
149
|--------------------------------------------------------|
151
|with 0 | 59.90 | 42.80 | 102.70 | 102.70 |
152
|--------------------------------------------------------|
153
|w/o 0 | 9.27 | 5.32 | 14.58 | 14.58 |
154
+--------------------------------------------------------+
157
+--------------------------------+
158
| | Table Row Total |
159
| cat# | w cat 0 | w/o cat 0 |
160
|--------------------------------|
161
|r 0 | 88.12 | 88.12 |
167
|--------------------------------|
169
|with 0 | 102.70 | 102.70 |
170
|--------------------------------|
171
|w/o 0 | 14.58 | 14.58 |
172
+--------------------------------+
177
<em>r.coin</em> calculates the coincidence of two raster
178
map layers. Although <em>r.coin</em> allows the user to
179
rerun the report using different units, it is not possible
180
to simply rerun the report with different map layers. In
181
order to choose new map layers, it is necessary to rerun
187
<a href="g.region.html">g.region</a>,
188
<!-- not ported to GRASS 6 <a href="m.ipf.html">m.ipf</a>, -->
189
<a href="r.category.html">r.category</a>,
190
<a href="r.describe.html">r.describe</a>,
191
<a href="r.reclass.html">r.reclass</a>,
192
<a href="r.report.html">r.report</a>,
193
<a href="r.stats.html">r.stats</a>
200
Michael Shapiro, <br>
201
U.S. Army Construction Engineering Research Laboratory
204
<i>Last changed: $Date: 2008-05-16 21:09:06 +0200 (Fri, 16 May 2008) $</i>