1r.what(1)                     Grass User's Manual                    r.what(1)
2
3
4

NAME

6       r.what   - Queries raster map layers on their category values and cate‐
7       gory labels.
8

KEYWORDS

10       raster
11

SYNOPSIS

13       r.what
14       r.what help
15       r.what     [-fcir]      input=string[,string,...]       [cache=integer]
16       [null=string]    [east_north=east,north[,east,north,...]]   [--verbose]
17       [--quiet]
18
19   Flags:
20       -f
21           Show the category label in the grid cell(s)
22
23       -c
24           Turn on cache reporting
25
26       -i
27           Output integer category values, not cell values
28
29       -r
30           Output color values as RRR:GGG:BBB
31
32       --verbose
33           Verbose module output
34
35       --quiet
36           Quiet module output
37
38   Parameters:
39       input=string[,string,...]
40           Name of existing raster map(s) to query
41
42       cache=integer
43           Size of point cache
44           Default: 500
45
46       null=string
47           Char string to represent no data cell
48           Default: *
49
50       east_north=east,north[,east,north,...]
51           Coordinates for query
52

DESCRIPTION

54       r.what outputs the category values and (optionally) the category labels
55       associated with user-specified locations on raster input map(s).  Loca‐
56       tions are specified as geographic x,y coordinate pairs (i.e.,  pair  of
57       eastings  and  northings);  the  user can also (optionally) associate a
58       label with each location.
59
60       The input coordinates can be entered directly on the command  line,  or
61       redirected  via  stdin  from  an input text file, script, or piped from
62       another program (like d.where).
63
64       If none of the above input methods are used and the module is run  from
65       the  terminal prompt, the program will interactively query the user for
66       point locations and labels.
67
68       Each line of the input consists of  an  easting,  a  northing,  and  an
69       optional label, which are separated by spaces. In interactive mode, the
70       word "end" must be typed after the last pair of input coordinates.
71
72       r.what output consists of the input geographic location and label, and,
73       for  each  user-named raster map layer, the category value, and (if the
74       -f label flag is specified) the  category  label  associated  with  the
75       cell(s) at this geographic location.
76

EXAMPLES

78   Input from stdin on the command line
79       Input coordinates may be given directly from stdin, for example:
80        (input data appears between the "EOF" markers)
81       r.what input=soils,aspect << EOF
82       635342.21 7654321.09 site 1
83       653324.88 7563412.42 site 2
84       EOF
85       635342.21|7654321.09|site 1|45|21
86       653324.88|7563412.42|site 2|44|20
87
88       echo "635342.21 7654321.09" | r.what input=soils,aspect
89       635342.21|7654321.09|45|21
90
91
92   Input from a text file containing coordinates
93       The  contents of an ASCII text file can be redirected to r.what as fol‐
94       lows. If we have a file called input_coord.txt containing  the  coordi‐
95       nates and labels given in the example above:
96       r.what input=soils,aspect < input_coord.txt
97       635342.21|7654321.09|site 1|45|21
98       653324.88|7563412.42|site 2|44|20
99
100
101   Input coordinates given as a module option
102       The module's east_north parameter can be used to enter coordinate pairs
103       directly. The maximum number of pairs will be limited by your  system's
104       maximum input line length (e.g. 4096 characters).
105       r.what                                               input=soils,aspect
106       east_north=635342.21,7654321.09,653324.88,7563412.42
107       635342.21|7654321.09|45|21
108       653324.88|7563412.42|44|20
109
110
111   Input coordinates piped from another program
112       The input coordinates may be "piped" from the stdout  of  another  pro‐
113       gram.  For example:
114       d.where | r.what input=soils,aspect
115       635342.21|7654321.09|45|21
116       653324.88|7563412.42|44|20
117         In  the  next  example,  vector  point coordinates are piped from the
118       v.out.ascii module . The standard UNIX program "tr" is used to  convert
119       the column separators in v.out.ascii's output into spaces for r.what.
120       v.out.ascii bugsites fs=' ' | r.what input=soils,aspect
121
122
123   Output containing raster map category labels
124       Here  we  use the -f label flag to enable the output of category labels
125       associated with the raster cell(s), as  well  as  values.  (categorical
126       maps only)
127       r.what -f input=soils,aspect << EOF
128       635342.21 7654321.09 site 1
129       653324.88 7563412.42 site 2
130       EOF
131       635342.21|7654321.09|site 1|45|NaC|21|30 degrees NW
132       653324.88|7563412.42|site 2|44|NdC|20|15 degrees NW
133
134

NOTE

136       The maximum number of raster map layers that can be queried at one time
137       is 150.
138

SEE ALSO

140        d.where, r.category, r.report, r.stats,  r.series,  r.univar,  v.what,
141       v.what.rast, v.what.vect
142

AUTHOR

144       Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
145
146       Last changed: $Date: 2007-10-10 10:01:00 +0200 (Wed, 10 Oct 2007) $
147
148       Full index
149
150       © 2003-2008 GRASS Development Team
151
152
153
154GRASS 6.3.0                                                          r.what(1)
Impressum