1d.what.rast(1) Grass User's Manual d.what.rast(1)
2
3
4
6 d.what.rast - Allows the user to interactively query the category con‐
7 tents of multiple raster map layers at user specified locations within
8 the current geographic region.
9
11 display
12
14 d.what.rast
15 d.what.rast help
16 d.what.rast [-1tc] map=name[,name,...] [fs=character]
17
18 Flags:
19 -1 Identify just one location
20
21 -t Terse output. For parsing by programs
22
23 -c Print out col/row for the entire map in grid resolution of the
24 region
25
26 Parameters:
27 map=name[,name,...]
28 Name of existing raster map(s)
29
30 fs=character
31 Field separator (terse mode only) Default: :
32
34 d.what.rast outputs the category values and labels associated with
35 cell(s) at user-specified location(s) on user-named raster map
36 layer(s).
37
38 The program will query the contents of raster map layer(s) named by the
39 user on the command line. These map layers must exist in the user's
40 current mapset search path. If the user does not name any raster map
41 layers on the command line, d.what.rast will query the category con‐
42 tents of whatever raster map layer is already displayed in the active
43 frame on the graphics monitor.
44
45 The program activates the mouse, and expects the user to indicate the
46 cell location(s) to be queried by depressing a mouse button over
47 desired location(s) within the current geographic region in the active
48 display frame on the graphic monitor.
49
51 It is helpful, but not necessary, to first display a map to be used for
52 reference in the active display frame before running d.what.rast. For
53 example, the user might type the following series of commands and
54 receive the output below.
55
56 d.rast map=soils
57
58 To first display the soils map in the active frame.
59
60 d.what.rast map=soils,aspect
61
62 User then moves the mouse to desired location on the displayed soils
63 map layer, and presses the left mouse button to query the category con‐
64 tents of the soils and aspect maps at this geographic location. The
65 program then outputs the below information to the user's terminal.
66
67
68 617112(E) 3732014(N)
69 soils in PERMANENT (44)Nunn clay loam, NdC
70 aspect in PERMANENT (20)15 degrees north of west
71
72
73 The first line of output gives the easting (E) and northing (N) coordi‐
74 nates of the geographic location at which the user clicked the mouse.
75 Subsequent lines give the selected map(s) name and mapset, map category
76 value (within parentheses), and map category label corresponding to
77 this user-selected map location.
78
79 The query may be repeated as often as desired using the left mouse but‐
80 ton. The right button on the mouse is used to quit the d.what.rast
81 session.
82
83 Users can set the -t flag to obtain a terse output from d.what.rast.
84 This is useful when the user wishes output to be parsed by another pro‐
85 gram (like awk). If the -t flag is set, users can also select the field
86 separator used (with the fs=name option), or elect to use the default :
87 field separator. In this case, the command
88
89 d.what.rast -t map=soils,aspect
90
91 produces output in the form shown below. The first line of output gives
92 the easting, northing, and the mouse button return value (see NOTES
93 below). Each subsequent line gives the map name and its mapset, the
94 category value, and category label of the point specified on the user-
95 named raster map layers. The default output field separator, a colon,
96 is used since none was specified on the command line.
97
98
99 617112:3732014:1
100 soils@PERMANENT:44:Nunn clay loam, NdC
101 aspect@PERMANENT:20:15 degrees north of west
102
103
104 Users can also use this program inside of shell scripts that require as
105 input a map category value and a mouse button depressed. Users can
106 choose an option to run d.what.rast only once, and return only the map
107 category value found and the number of the mouse button depressed.
108
110 Mouse button return values are as follows: 0 indicates no button was
111 pressed, 1 indicates that the left mouse button was pressed, 2 indi‐
112 cates the middle button was pressed, and 3 indicates that the right
113 mouse button was pressed.
114
115 d.what.rast will always print its output to the terminal screen.
116 d.what.rast output can be redirected into a file; however, if it is,
117 the output will go both to the screen and to the file. For example:
118
119 d.what.rast map=soils,aspect > what.out
120
121 will both send d.what.rast output to the screen and capture its output
122 in the file named what.out.
123
124 The maximum number of raster map layers that can be queried at one time
125 is 15.
126
127 d.what.vect allows the user to interactively query the category con‐
128 tents of multiple vector map layers at user-specified locations.
129
131 d.rast
132 d.what.vect
133 g.region
134
136 Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
137
138 Last changed: $Date: 2004/08/05 12:53:21 $
139
140 Full index
141
142
143
144GRASS 6.2.2 d.what.rast(1)