r.coin.html 7.9 KB

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