other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
r.what(1grass) | Grass User's Manual | r.what(1grass) |
NAME¶
r.what - Queries raster map layers on their category values and category labels.KEYWORDS¶
raster, queryingSYNOPSIS¶
r.whatFlags:¶
- -n
-
- -f
-
- -r
-
- -i
-
- -c
-
- --verbose
-
- --quiet
-
Parameters:¶
- input=string[,string,...]
-
- cache=integer
-
- null=string
-
- fs=character
-
- east_north=east,north[,east,north,...]
-
DESCRIPTION¶
r.what outputs the category values and (optionally) the category labels associated with user-specified locations on raster input map(s). Locations are specified as geographic x,y coordinate pairs (i.e., pair of eastings and northings); the user can also (optionally) associate a label with each location. The input coordinates can be entered directly on the command line, or redirected via stdin from an input text file, script, or piped from another program (like d.where). If none of the above input methods are used and the module is run from the terminal prompt, the program will interactively query the user for point locations and labels. Each line of the input consists of an easting, a northing, and an optional label, which are separated by spaces. In interactive mode, the word "end" must be typed after the last pair of input coordinates. r.what output consists of the input geographic location and label, and, for each user-named raster map layer, the category value, and (if the -f label flag is specified) the category label associated with the cell(s) at this geographic location.EXAMPLES¶
Input from stdin on the command line¶
Input coordinates may be given directly from stdin, for example:(input data appears between the "EOF" markers)
Input from a text file containing coordinates¶
The contents of an ASCII text file can be redirected to r.what as follows. If we have a file called input_coord.txt containing the coordinates and labels given in the example above:Input coordinates given as a module option¶
The module's east_north parameter can be used to enter coordinate pairs directly. The maximum number of pairs will be limited by your system's maximum input line length (e.g. 4096 characters).Input coordinates piped from another program¶
The input coordinates may be "piped" from the stdout of another program. For example:Output containing raster map category labels¶
Here we use the -f label flag to enable the output of category labels associated with the raster cell(s), as well as values. (categorical maps only)NOTE¶
The maximum number of raster map layers that can be queried at one time is 400.SEE ALSO¶
d.where, r.category, r.report, r.stats, r.series, r.univar, v.what, v.what.rast, v.what.vectAUTHOR¶
Michael Shapiro, U.S. Army Construction Engineering Research Laboratory Last changed: $Date: 2010-09-16 09:25:59 +0200 (Thu, 16 Sep 2010) $ Full index © 2003-2014 GRASS Development TeamGRASS 6.4.4 |