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 [-qw] map1=string map2=string units=string
16
17   Flags:
18       -q  Quiet
19
20       -w  Wide report, 132 columns (default: 80)
21
22   Parameters:
23       map1=string
24           Name of first raster map
25
26       map2=string
27           Name of second raster map
28
29       units=string
30           Unit of measure Options: c,p,x,y,a,h,k,m
31

NAME

33       r.coin
34

DESCRIPTION

36       r.coin tabulates the mutual occurrence of two raster map layers'  cate‐
37       gories with respect to one another.  This analysis program respects the
38       current geographic region and mask settings.
39
40       r.coin tabulates the coincidence of category values among the  two  map
41       layers and prepares the basic table from which the report is to be cre‐
42       ated.  This tabulation is followed by an indication  of  how  long  the
43       coincidence  table  will  be.  If the table is extremely long, the user
44       may decide that viewing it is not so important after all, and may  can‐
45       cel  the  request  at  this point.  Assuming the user continues, r.coin
46       then allows the user to choose one of eight units of measure  in  which
47       the report results can be given.  These units are:
48
49       c cells
50
51       p percent cover of region
52
53       x percent of  category (column)
54
55       y percent of  category (row)
56
57       a acres
58
59       h hectares
60
61       k square kilometers
62
63       m square miles
64
65       Note  that  three  of  these options give results as percentage values:
66       "p" is based on the grand total number of cells; "x" is based  on  only
67       column  totals;  and "y" is based on only row totals.  Only one unit of
68       measure can be selected per report output.  Type in  just  one  of  the
69       letters  designating a unit of measure followed by a for review.  After
70       reviewing the report on the screen, the user is given several  options.
71       The  report  may  be  saved  to  a  file  and/or sent to a printer.  If
72       printed, it may be printed with either 80 or 132 columns.  Finally, the
73       user  is  given  the option to rerun the coincidence tabulation using a
74       different unit of measurement.
75
76       Below is a sample of tabular output produced by r.coin.  Here, map out‐
77       put is stated in units of square miles.  The report tabulates the coin‐
78       cidence of the Spearfish sample database's owner and  road  raster  map
79       layers' categories.  The owner categories in this case refer to whether
80       the land is in private hands (category 1) or is owned by the U.S.  For‐
81       est Service (category 2). The roads map layer categories refer to vari‐
82       ous types of roads (with the exception of  category  value  "0",  which
83       indicates  "no  data";  i.e.,  map  locations at which no roads exist).
84       r.coin does not report category labels. The user should run r.report or
85       r.cats to obtain this information.
86
87       The  body  of  the report is arranged in panels. The map layer with the
88       most categories is arranged along the vertical axis of the  table;  the
89       other,  along the horizontal axis.  Each panel has a maximum of 5 cate‐
90       gories (9 if printed) across the top. In addition, the last two columns
91       reflect  a  cross  total of each column for each row.  All of the cate‐
92       gories of the map layer arranged along the vertical axis  are  included
93       in  each  panel.   There is a total at the bottom of each column repre‐
94       senting the sum of all the rows in that column. A second  total  repre‐
95       sents  the  sum of all the non-zero category rows. A cross total (Table
96       Row Total) of all columns for each row appears in a separate panel.
97
98       Note how the following information may  be  obtained  from  the  sample
99       report.
100
101       In  the  Spearfish  data base, in area not owned by the Forest Service,
102       there are 50.63 square miles of land not used for roads. Roads make  up
103       9.27 square miles of land in this area.
104
105       Of  the  total  102.70 square miles in Spearfish, 42.80 square miles is
106       owned by the Forest Service.
107       In total, there are 14.58 square miles of roads.
108
109       There are more category 2 roads outside Forest Service land  (2.92  mi.
110       sq.)  than there are inside Forest land boundaries (0.72 mi. sq.).
111
112       Following is a sample report.
113       +------------------------------------------------------------+
114       |                    COINCIDENCE TABULATION REPORT           |
115       |------------------------------------------------------------|
116       |Location: spearfish    Mapset: PERMANENT   Date: Wed Jun 1  |
117       |                                                            |
118       | Layer 1: owner          -- Ownership                       |
119       | Layer 2: roads          -- Roads                           |
120       | Mask:    none                                              |
121       |                                                            |
122       | Units:   square miles                                      |
123       |------------------------------------------------------------|
124       | Window:                North: 4928000.00                   |
125       |          West: 590000.00               East: 609000.00     |
126       |                        South: 4914000.00                   |
127       +------------------------------------------------------------+
128       Panel #1 of 1
129       +--------------------------------------------------------+
130       |        | owner                 |    Panel Row Total    |
131       |   cat# |         1 |         2 |   w cat 0 | w/o cat 0 |
132       |--------------------------------------------------------|
133       |r     0 |     50.63 |     37.49 |     88.12 |     88.12 |
134       |o     1 |      1.53 |      0.68 |      2.21 |      2.21 |
135       |a     2 |      2.92 |      0.72 |      3.64 |      3.64 |
136       |d     3 |      3.97 |      2.57 |      6.54 |      6.54 |
137       |s     4 |      0.65 |      1.36 |      2.00 |      2.00 |
138       |      5 |      0.19 |      0.00 |      0.19 |      0.19 |
139       |--------------------------------------------------------|
140       |Total   |           |           |           |           |
141       |with 0  |     59.90 |     42.80 |    102.70 |    102.70 |
142       |--------------------------------------------------------|
143       |w/o 0   |      9.27 |      5.32 |     14.58 |     14.58 |
144       +--------------------------------------------------------+
145       +--------------------------------+
146       |        |    Table Row Total    |
147       |   cat# |   w cat 0 | w/o cat 0 |
148       |--------------------------------|
149       |r     0 |     88.12 |     88.12 |
150       |o     1 |      2.21 |      2.21 |
151       |a     2 |      3.64 |      3.64 |
152       |d     3 |      6.54 |      6.54 |
153       |s     4 |      2.00 |      2.00 |
154       |      5 |      0.19 |      0.19 |
155       |--------------------------------|
156       |Total   |           |           |
157       |with 0  |    102.70 |    102.70 |
158       |--------------------------------|
159       |w/o 0   |     14.58 |     14.58 |
160       +--------------------------------+
161
162

NOTES

164       It  is  not  a  good idea to run r.coin on a map layer which has a mon‐
165       strous number of categories  (e.g.,  unreclassed  elevation).   Because
166       r.coin reports information for each and every category, it is better to
167       reclassify those categories (using reclass) into a more manageable num‐
168       ber prior to running r.coin on the reclassed raster map layer.
169
170       r.coin  calculates  the coincidence of two raster map layers.  Although
171       r.coin allows the user to rerun the report using different units, it is
172       not  possible to simply rerun the report with different map layers.  In
173       order to choose new map layers, it is necessary to rerun r.coin.
174

SEE ALSO

176       g.region, m.ipf, r.cats, r.describe, r.reclass, r.report, r.stats
177

AUTHORS

179       Michael O'Shea,
180       Michael Shapiro,
181       U.S. Army Construction Engineering Research Laboratory
182
183       Last changed: $Date: 2006/04/13 19:01:37 $
184
185
186
187GRASS 6.2.2                                                          r.coin(1)
Impressum