d.rast.arrow.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <h2>DESCRIPTION</h2>
  2. <em>d.rast.arrow</em>
  3. is designed to help users better visualize surface water flow direction,
  4. as indicated in an aspect raster map layer. There are two ways to specify
  5. the aspect layer the program is to use. The first is to display the aspect
  6. map layer on the graphics monitor before running <em>d.rast.arrow</em>.
  7. The second method involves setting the <em>map</em> parameter
  8. to the name of the desired aspect map.
  9. This allows the arrows to be drawn over any other maps already displayed
  10. on the graphics monitor.
  11. <p>
  12. <em>d.rast.arrow</em> will draw an arrow over each displayed cell
  13. to indicate in which direction the cell slopes. If the aspect
  14. layer has a category value denoting locations of "unknown" aspect,
  15. <em>d.rast.arrow</em> draws a question mark over the displayed cells
  16. of that category.
  17. Cells containing null data will be marked with an "X".
  18. You can disable drawing of null data and unknown aspect values by
  19. setting its color to "<tt>none</tt>".
  20. <p>When specifying the <em>magnitude_map</em> option, arrow lengths
  21. denoting magnitude will be extracted from the cell values of the specified
  22. map. In this case the tail of the arrow will be centered on the source cell.
  23. You may adjust the overall scale using the <em>scale</em> option.
  24. <em>d.rast.arrow</em> will ignore NULL and negative magnitudes, and will
  25. warn you if the debug level is set at 5 or higher. Be aware. If your application
  26. uses negative values for magnitude, you can use
  27. <em><a href="r.mapcalc.html">r.mapcalc</a></em> to prepare the magnitude map to
  28. suit your needs (absolute value, inverted direction and so on).
  29. <p><h2>NOTES</h2>
  30. By default, arrows are drawn at the size of a cell and cannot be seen if
  31. the raster map is relatively close in scale. You can use the <em>skip</em>
  32. option to draw arrows every n-th cell in both directions if you are working
  33. with relatively high resolutions. It may be useful to disable the grid in
  34. this case, which is accomplished by setting its color to "<tt>none</tt>".
  35. <p>For GRASS and Compass type aspect maps, the cell values of the aspect map
  36. will determine the corresponding direction in 360 degrees. ANSWERS type aspect
  37. maps will be plotted in multiples of 15 degrees counterclockwise from east, and
  38. AGNPS and Drainage type aspect maps will be displayed in D8 representation,
  39. i.e. the eight multiples of 45 degrees. Cell values are 1 to 8 clockwise from
  40. north for AGNPS and 1 to 8 counterclockwise from north east for Drainage. See
  41. <em><a href="r.watershed.html">r.watershed</a></em> for more details about the
  42. Drainage aspect.
  43. <p>GRASS aspect maps are measured using Cartesian conventions, i.e. in degrees
  44. counterclockwise from east. e.g.:
  45. <div class="code"><pre>
  46. 90 North
  47. 180 West
  48. 270 South
  49. 0,360 East
  50. </pre></div>
  51. They can be created from a raster elevation map with
  52. <em><a href="r.slope.aspect.html">r.slope.aspect</a></em>.
  53. <p>Compass type aspect maps are measured in degrees clockwise from north.
  54. <p>This module uses oceanographic conventions, i.e. arrows point downslope or
  55. direction "to", as opposed to atmospheric conventions (direction "from").
  56. <h2>EXAMPLE</h2>
  57. <!-- TODO: add NC example: where to get U and V maps from? -->
  58. Convert U,V velocity component maps into magnitude,direction maps for use
  59. with <em>d.rast.arrow</em>:
  60. <div class="code"><pre>
  61. r.mapcalc "magnitude = sqrt(U_map^2 + V_map^2)"
  62. r.mapcalc "direction = atan(U_map, V_map)"
  63. d.rast.arrow map=direction type=grass magnitude_map=magnitude skip=3 grid=none
  64. </pre></div>
  65. <!-- Data based on https://grasswiki.osgeo.org/wiki/GRIB -->
  66. <center>
  67. <img src="d_rast_arrow_wind.png"><br>
  68. <i>Sea wind speed (magnitude) and direction shown in the Tasmanian Sea</i>
  69. </center>
  70. <h2>SEE ALSO</h2>
  71. <em>
  72. <a href="d.frame.html">d.frame</a>,
  73. <a href="d.rast.html">d.rast</a>,
  74. <a href="d.rast.edit.html">d.rast.edit</a>,
  75. <a href="d.rast.num.html">d.rast.num</a>,
  76. <a href="g.region.html">g.region</a>,
  77. <a href="r.slope.aspect.html">r.slope.aspect</a>,
  78. <a href="r.watershed.html">r.watershed</a>
  79. </em>
  80. <h2>AUTHORS</h2>
  81. <u>Original author</u><br>
  82. Chris Rewerts<br>
  83. <em>Agricultural Engineering,<br>
  84. Purdue University</em><br><br>
  85. <u>Magnitude and 360 arrow code</u><br>
  86. Hamish Bowman<br>
  87. <em>Department of Marine Science,<br>
  88. University of Otago, New Zealand</em><br><br>
  89. <u>Align grids with raster cells and Drainage aspect type</u><br>
  90. Huidae Cho<br>
  91. <p><i>Last changed: $Date$</i>