r.cross.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <h2>DESCRIPTION</h2>
  2. <em>r.cross</em> creates an <em>output</em> raster map layer representing
  3. all unique combinations of category values in the raster input layers
  4. (<b>input=</b><em>name,name,name</em>, ...). At least two, but not more than
  5. ten, <em>input</em> map layers must be specified. The user must also
  6. specify a name to be assigned to the <em>output</em> raster map layer
  7. created by <em>r.cross</em>.
  8. <h2>OPTIONS</h2>
  9. The program will be run non-interactively if the user specifies
  10. the names of between 2-10 raster map layers be used as <em>input</em>,
  11. and the name of a raster map layer to hold program <em>output</em>.
  12. <p>
  13. With the <b>-z</b> flag zero data values are not crossed.
  14. This means that if a zero category value occurs in any input data layer,
  15. the combination is assigned to category zero in the resulting map layer,
  16. even if other data layers contain non-zero data.
  17. In the example given above, use of the <b>-z</b> option
  18. would cause 3 categories to be generated instead of 5.
  19. <p>
  20. If the <b>-z</b> flag is not specified, then map layer combinations
  21. in which not all category values are zero will be assigned
  22. a unique category value in the resulting map layer.
  23. <p>
  24. Category values in the new <em>output</em> map layer will be the
  25. cross-product of the category values from these existing <em>input</em> map
  26. layers.
  27. <h2>EXAMPLE</h2>
  28. For example, suppose that, using two raster map layers,
  29. the following combinations occur:
  30. <div class="code"><pre>
  31. map1 map2
  32. ___________
  33. 0 1
  34. 0 2
  35. 1 1
  36. 1 2
  37. 2 4
  38. </pre></div>
  39. <em>r.cross</em> would produce a new raster map layer with 5 categories:
  40. <div class="code"><pre>
  41. map1 map2 output
  42. ____________________
  43. 0 1 1
  44. 0 2 2
  45. 1 1 3
  46. 1 2 4
  47. 2 4 5
  48. </pre></div>
  49. Note: The actual category value assigned to a particular combination
  50. in the <em>result</em> map layer is
  51. dependent on the order in which the combinations occur in the input map
  52. layer data and can be considered essentially random.
  53. The example given here is illustrative only.
  54. <h2>SUPPORT FILES</h2>
  55. The category file created for the <em>output</em> raster map
  56. layer describes the
  57. combinations of input map layer category values which generated
  58. each category.
  59. In the above example, the category labels would be:
  60. <div class="code"><pre>
  61. category category
  62. value label
  63. ______________________________
  64. 1 layer1(0) layer2(1)
  65. 2 layer1(0) layer2(2)
  66. 3 layer1(1) layer2(1)
  67. 4 layer1(1) layer2(2)
  68. 5 layer1(2) layer2(4)
  69. </pre></div>
  70. A random color table is also generated for the <em>output</em> map layer.
  71. <!-- TODO: add example -->
  72. <h2>SEE ALSO</h2>
  73. <em><a href="r.covar.html">r.covar</a></em>,
  74. <em><a href="r.stats.html">r.stats</a></em>
  75. <h2>AUTHOR</h2>
  76. Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
  77. <p><i>Last changed: $Date$</i>