3
<em>d.what.rast</em> outputs the category values and labels
4
associated with cell(s) at user-specified location(s) on
5
user-named raster map layer(s).
9
The program will query the contents of raster map layer(s)
10
named by the user on the command line. These map layers
11
must exist in the user's current mapset search path. If
12
the user does not name any raster map layers on the command
13
line, <em>d.what.rast</em> will query the category contents
14
of whatever raster map layer is already displayed in the
15
active frame on the graphics monitor.
19
The program activates the mouse, and expects the user to
20
indicate the cell location(s) to be queried by depressing a
21
mouse button over desired location(s) within the current
22
geographic region in the active display frame on the
28
Mouse button return values are as follows: 0 indicates no
29
button was pressed, 1 indicates that the left mouse button
30
was pressed, 2 indicates the middle button was pressed, and
31
3 indicates that the right mouse button was pressed.
35
<em>d.what.rast</em> will always print its output to the
36
terminal screen. <em>d.what.rast</em> output can be
37
redirected into a file; however, if it is, the output will
38
go both to the screen and to the file. For example:
43
<dt><b>d.what.rast map=</b><em>soils,aspect</em><b> > what.out</b>
45
<dd>will both send <em>d.what.rast</em> output to the screen
46
and capture its output in the file named
47
<em>what.out</em>.</dd>
52
The maximum number of raster map layers that can be queried at one time is 15.
56
<em><a href="d.what.vect.html">d.what.vect</a></em>
57
allows the user to interactively query the category
58
contents of multiple vector map layers at user-specified
64
It is helpful, but not necessary, to first display a map to
65
be used for reference in the active display frame before
66
running <em>d.what.rast</em>. For example, the user might
67
type the following series of commands and receive the
73
<dt><b>d.rast map=</b><em>soils</em></dt>
75
<dd>To first display the <em>soils</em> map in the active frame.</dd>
80
<dt><b>d.what.rast map=</b><em>soils,aspect</em></dt>
82
<dd>User then moves the mouse to desired location on the
83
displayed <em>soils</em> map layer, and presses the left
84
mouse button to query the category contents of the
85
<em>soils</em> and <em>aspect</em> maps at this geographic
86
location. The program then outputs the below information
87
to the user's terminal.</dd>
92
soils in PERMANENT (44)Nunn clay loam, NdC
93
aspect in PERMANENT (20)15 degrees north of west
97
The first line of output gives the easting (E) and northing (N) coordinates
98
of the geographic location at which the user clicked the mouse.
99
Subsequent lines give the selected map(s) name and mapset, map category value
100
(within parentheses), and map category label corresponding to this
101
user-selected map location.
105
The query may be repeated as often as desired using the
106
left mouse button. The right button on the mouse is used
107
to quit the <em>d.what.rast</em> session.
111
Users can set the <b>-t</b> flag to obtain a terse output
112
from <em>d.what.rast</em>. This is useful when the user
113
wishes output to be parsed by another program (like
114
<em>awk</em>). If the <b>-t</b> flag is set, users can also
115
select the field separator used (with the
116
<b>fs=</b><em>name</em> option), or elect to use the
117
default <b>:</b> field separator. In this case, the
123
<dt><b>d.what.rast -t map=</b><em>soils,aspect</em>
125
<dd> produces output in the form shown below. The first line of
126
output gives the easting, northing, and the mouse button
127
return value (see NOTES below). Each
128
subsequent line gives the map name and its mapset, the
129
category value, and category label of the point specified
130
on the user-named raster map layers. The default output
131
field separator, a colon, is used since none was specified
132
on the command line.</dd>
137
soils@PERMANENT:44:Nunn clay loam, NdC
138
aspect@PERMANENT:20:15 degrees north of west
143
Users can also use this program inside of shell scripts
144
that require as input a map category value and a mouse
145
button depressed. Users can choose an option to run
146
<em>d.what.rast</em> only once, and return only the map
147
category value found and the number of the mouse button
154
<a href="d.rast.html">d.rast</a><br>
155
<a href="d.what.vect.html">d.what.vect</a><br>
156
<a href="g.region.html">g.region</a>
162
U.S. Army Construction Engineering
166
<i>Last changed: $Date: 2013-04-13 12:41:41 +0200 (Sat, 13 Apr 2013) $</i>