d.rast.edit.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <h2>DESCRIPTION</h2>
  2. The <em>d.rast.edit</em> program allows users to interactively
  3. edit cell category values in a raster map layer displayed to the
  4. graphics monitor using a mouse cursor.
  5. <h3>Overview window</h3>
  6. An overview window shows the entire map with a red box showing the current
  7. editing region. The edit window shows the cells within the selected area.
  8. Click on a new spot on the overview window to move the editing area.
  9. <h3>Raster cell editing</h3>
  10. Cell editing is done using the mouse cursor to indicate the cell(s) on
  11. the displayed raster map that are to be edited.
  12. <p>
  13. To change the value of a cell put the new value to use in the "New value"
  14. box at the bottom left of the edit window. A value of "*" indicates a
  15. NULL value should be used.
  16. <p>
  17. <b>Important:</b> the new value in the "New value" box must be confirmed
  18. with ENTER, otherwise it is not yet active.
  19. <h3>Saving the edited map</h3>
  20. To save the edited map, the "File" menu contains the entry <b>Save</b>.
  21. To leave <em>d.rast.edit</em>, use <b>Exit</b> in the menu.
  22. <h3>Map pan with arrow keys</h3>
  23. The map can be shifted using the arrow keys on the keyboard.
  24. <!-- currently broken, see #
  25. <h3>Arrows</h3>
  26. This function is available for users editing aspect maps. The
  27. <em><a href="d.rast.arrow.html">d.rast.arrow</a></em> program is
  28. called, which draws arrows over the displayed
  29. cells to indicate the downslope direction of the cell.
  30. You can set the aspect map to use on the command line.
  31. Aspect maps are expected to be in regular "GRASS" format, as produced by
  32. <em><a href="r.slope.aspect.html">r.slope.aspect</a></em>; i.e. degrees
  33. counter-clockwise from east.
  34. -->
  35. <h2>NOTES</h2>
  36. There is no "undo" command nor way to exit edit mode without saving
  37. changes to the output map.
  38. <p>
  39. <!-- MASK behaviour to be verified -->
  40. Any MASK in place will be respected when writing the new raster map layer,
  41. including any edits to the MASKed areas.
  42. <h3>Geographic Region Concerns</h3>
  43. <!-- region behaviour to be verified -->
  44. <em>d.rast.edit</em> reads the region definition for the raster map layer
  45. being edited from its internal cell header file. The new, edited copy of
  46. the raster layer will be created with the same resolution and region
  47. dimensions.
  48. <p>The primary bane of the <em>d.rast.edit</em> program involves large map
  49. layers with lots of rows and columns) and/or slow computers,
  50. since the program must read and write raster map layers row by row for
  51. the full size of the map layer as dictated by its region size and resolution.
  52. (The current region settings of north, south, east, and west
  53. will not limit the size of the edited copy of the map layer,
  54. since by use of the overview selection these values may change several
  55. times during the editing session).
  56. <h2>EXAMPLE</h2>
  57. Editing raster values in a LiDAR DEM, North Carolina sample data:
  58. <div class="code"><pre>
  59. g.region raster=elev_lid792_1m -p
  60. # pan to area of interest and edit raster cells (I used "102" as value to modifiy cells
  61. # Use: File > Save to save
  62. # then: File > Exit
  63. d.rast.edit input=elev_lid792_1m output=elev_lid792_1m_modified
  64. # comparison of raster statistics
  65. # original stats, note the min value
  66. r.univar -g elev_lid792_1m
  67. # modified map stats, note the min value
  68. r.univar -g elev_lid792_1m_modified
  69. </pre></div>
  70. <div align="center" style="margin: 10px">
  71. <a href="d_rast_edit.png">
  72. <img src="d_rast_edit.png" width="600" height="281" alt="d.rast.edit example" border="0">
  73. </a><br>
  74. <i>Figure: Editing of pixels in an elevation raster map using d.rast.edit</i>
  75. </div>
  76. <h2>TODO</h2>
  77. <em>d.rast.edit</em> should not create a new raster map layer if
  78. the user makes no cell edits while running the program and leaving it
  79. without saving.
  80. <p>
  81. It would be nice to incorporate a scrollable version of <em>
  82. <a href="d.legend.html">d.legend</a>
  83. </em>
  84. (such that one could see a label legend for files with many categories on
  85. a standard size sub-frame). It would be even nicer to be able
  86. to select the category values from a graphical legend when editing
  87. cell values (thereby saving a trip to the text frame to type in the
  88. new value).
  89. <p>Perhaps method(s) for multiple or mass cell edits would be useful.
  90. This could be done by providing modes in which the user may:
  91. <ol>
  92. <li> edit a block of cells to a given value by drawing a box;</li>
  93. <li> be able to choose a given value which is automatically used as
  94. the new value on each cell chosen until a different value is desired.</li>
  95. </ol>
  96. <p>There is no user-interrupt handling. This could leave files in .tmp
  97. or (rarely) result in half-baked raster maps. The original file
  98. would survive unscathed by an interrupt at most any point in execution.
  99. Beware of exiting the program
  100. by means other than using <em>exit</em> on the <em>Main Menu</em>.
  101. <h2>SEE ALSO</h2>
  102. <em>
  103. <a href="d.rast.arrow.html">d.rast.arrow</a>,
  104. <a href="d.rast.num.html">d.rast.num</a>,
  105. <a href="wxGUI.rdigit.html">wxGUI.rdigit</a>
  106. </em>
  107. <h2>AUTHOR</h2>
  108. Tcl/Tk (2007) and wxPython versions (2008): Glynn Clements<br>
  109. <br>
  110. Replaces Xdriver version in C by Chris Rewerts, April 1991,
  111. Agricultural Engineering, Purdue University
  112. <!--
  113. <p>
  114. <i>Last changed: $Date$</i>
  115. -->