1d.rast.edit(1)                Grass User's Manual               d.rast.edit(1)
2
3
4

NAME

6       d.rast.edit
7

DESCRIPTION

9       The  d.rast.edit  program allows users to interactively edit cell cate‐
10       gory values in a raster map layer displayed  to  the  graphics  monitor
11       using  a  mouse cursor.  This program determines the name of the raster
12       map layer currently displayed in  the  active  frame  on  the  selected
13       graphics  monitor  (if  none,  program  will  abort).  The user is then
14       prompted for the name of a new  raster  layer  to  be  created  in  his
15       mapset.   d.rast.edit  does  not  modify the user's original raster map
16       layer.
17

Geographic Region Concerns

19       d.rast.edit reads the region definition for the raster map layer  being
20       edited  from  its cell header file.  The new, edited copy of the raster
21       layer will be created with the same resolution and  region  dimensions.
22       If  the current region resolution does not match the raster map layer's
23       resolution, the program will abort.  The north, south, east,  and  west
24       geographic  region  settings  of  the  current region can be set to any
25       view, as long as they fall within the  boundaries  of  the  raster  map
26       layer  described in its cell header.  This is important, since the cur‐
27       rent view must be such that individual cell locations are easily  visi‐
28       ble  and  sufficiently  large  on the graphics monitor to be pointed at
29       with the mouse cursor.  Any mask in place will be ignored when  writing
30       the new raster map layer.
31

Mouse Menus

33       Cell editing is done using a mouse cursor to choose menu selections and
34       indicate areas on the displayed raster map that are to be edited.
35
36       Selections available via the Main Menu and the subsequent functions  or
37       sub-menus are described below: 1. Edit
38       invokes edit mode, during which no graphic menus are used, so that none
39       of the displayed map is hidden.  At the start of the edit mode, a  grid
40       is  drawn  over  displayed  cells  to help distinguish cell boundaries.
41       Interaction with the program during edit mode  is  done  by  using  the
42       three mouse buttons as follows: Left Button
43       what's  here.   Identify the category value of the cell under the mouse
44       cursor when the button is pressed.  The category value of this cell  is
45       printed in the text frame.
46
47       Middle Button
48       edit.  The current category value of the cell under the mouse cursor is
49       iterated and a prompt for a new cell value appears on the textual  com‐
50       mand  frame.   (Remember to move the mouse to the text frame).  Enter a
51       new cell category value which is within the range of  current  category
52       values  for  the map layer.  Note:  the edited cell is displayed in the
53       color of the newly-assigned category value, but is hatched  with  lines
54       of  the  grid color to indicate it has been edited, since, if the value
55       of the cell is polled (before leaving  edit  mode),  the  old  category
56       value will be reported.
57
58       Right Button
59       exit  edit  mode.  Command is returned to the Main Menu on the graphics
60       monitor.  If cell value changes were made during edit mode,  they  will
61       be saved upon exit.
62
63       2. Redraw
64       redisplays the raster map layer on the graphics monitor.
65
66       3. Zoom
67       calls the d.zoom
68        program,  to  allow  changing  the  view  of the raster layer.  Zoom's
69       instructions will appear on the text command  window.   Interaction  is
70       conducted using mouse keys.
71
72       4. Arrow
73       This  function  is  available  for  users  editing  aspect  maps.   The
74       d.rast.arrow program is called, which draws arrows over  the  displayed
75       cells to indicate the downslope direction of the cell.  After selecting
76       the arrow selection from the main menu, sub-menus will appear, allowing
77       input  options  to be set for the d.rast.arrow program.  The first sub-
78       menu selects the type of aspect data displayed.  (regular "GRASS"  for‐
79       mat,  as produced by r.slope.aspect ; a format prepared as input to the
80       "AGNPS" program; and a format prepared for the "ANSWERS"  program.  The
81       d.rast.arrow  program  can  accept the name of a layer not drawn on the
82       display for use as input, and an option is given to input the  name  of
83       that  layer,  if desired.  Otherwise, the currently displayed map layer
84       will be used.  Next, the color options of d.rast.arrow may be  set  via
85       separate menus, or a choice for using default settings may be used.
86
87       5. Number
88       calls the d.rast.num program, which will print the cell category values
89       over the displayed cells on the graphic monitor.
90
91       6. Exit
92       quit the d.rast.edit program.  If edits have been made, the new  raster
93       map  layer  will  be created.  Support files are constructed.  Category
94       labels and color maps (if any) are  copied  from  the  original  layer.
95       d.rast.edit  redisplays  the original raster map file on the monitor as
96       it exits.
97

NOTES

99       d.rast.edit will not create a new raster map layer if the user makes no
100       cell edits while running the program.
101
102       Be  careful not to cover the graphics monitor window with another frame
103       during the editing process.  In some cases, the redraw option  will  be
104       able to remove traces of other frames;  otherwise, the graphics monitor
105       will not be refreshed until after  d.rast.edit  exits.   Further  note,
106       however,  that  this  has only been tested on SUN workstations, using a
107       modified SUNVIEW graphics monitor driver.
108
109       The primary bane of the d.rast.edit program involves large  map  layers
110       (with  lots  of rows and columns) and/or slow computers, since the pro‐
111       gram must read and write raster map layers row by row for the full size
112       of  the  map layer as dictated by its region size and resolution.  (The
113       current region settings of north, south, east, and west will not  limit
114       the  size  of  the  edited  copy  of the map layer, since by use of the
115       d.zoom program, these values may change several times during the  edit‐
116       ing  session).   Their effects could be lessened if the program were to
117       create a table of changes that it could incorporate into the new raster
118       file  on  a  forked  process  started when the user exits, or otherwise
119       allow the user to issue a "save" command when he has made  all  desired
120       edits  to  the raster file.  Currently, for instance, if the user needs
121       to use  d.zoom to access a different area of the map, he must wait  for
122       a read and write for each entrance and egress of the edit mode.
123
124       There  is  no  "undo"  command  or way to exit edit mode without saving
125       changes.
126
127       It would be nice to incorporate a scrollable version of d.legend  (such
128       that  one  could see a legend for files with many categories on a stan‐
129       dard size sub-frame).  It would be even nicer to be able to select  the
130       category  values  from  a  graphical  legend  when  editing cell values
131       (thereby saving a trip to the text frame to type in the new value).
132
133       Perhaps method(s) for multiple  or mass cell  edits  would  be  useful.
134       This  could be done by providing modes in which the user may: 1) edit a
135       block of cells to a given value by drawing a box; 2) be able to  choose
136       a given value which is automatically used as the new value on each cell
137       chosen until a different value is desired.
138
139       There is no interrupt handling.  This could  leave  files  in  .tmp  or
140       (rarely)  result  in  half-baked raster files.  The original file would
141       survive unscathed by an interrupt at most any point in  execution,  but
142       the graphics monitor may be left in an indeterminate state (try d.erase
143        or  d.mon select=monitor_name to bring it back into shape).  Beware of
144       exiting the program by means other than using exit on the Main Menu.
145
146       The program has no method to enter new values beyond the current  range
147       of categories, but additional programming could make it so.
148

SEE ALSO

150       d.erase,  d.frame,  d.mon,  d.rast,  d.rast.arrow,  d.rast.num, d.zoom,
151       g.region, r.slope.aspect
152

AUTHOR

154       Chris Rewerts, Agricultural Engineering, Purdue University
155
156       Last changed: $Date: 2006/04/13 18:50:10 $
157
158
159
160GRASS 6.2.2                                                     d.rast.edit(1)
Impressum