1r.coin(1)                     Grass 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
11

SYNOPSIS

13       r.coin
14       r.coin help
15       r.coin  [-wq]   map1=string   map2=string   units=string    [--verbose]
16       [--quiet]
17
18   Flags:
19       -w
20           Wide report, 132 columns (default: 80)
21
22       -q
23           Run quietly
24
25       --verbose
26           Verbose module output
27
28       --quiet
29           Quiet module output
30
31   Parameters:
32       map1=string
33           Name of first raster map
34
35       map2=string
36           Name of second raster map
37
38       units=string
39           Unit of measure
40           Options: c,p,x,y,a,h,k,m
41

DESCRIPTION

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

NOTES

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

EXAMPLE

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

SEE ALSO

192        g.region, r.category, r.describe, r.reclass, r.report, r.stats
193

AUTHORS

195       Michael O'Shea,
196       Michael Shapiro,
197       U.S. Army Construction Engineering Research Laboratory
198
199       Last changed: $Date: 2008-01-13 02:01:00 +0100 (Sun, 13 Jan 2008) $
200
201       Full index
202
203       © 2003-2008 GRASS Development Team
204
205
206
207GRASS 6.3.0                                                          r.coin(1)
Impressum