The input coordinates can be entered directly on the command line via coordinates parameter, or redirected via stdin from an input text file, script, or piped from another program (like v.out.ascii). Coordinates can be given also as a vector points map (points).
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.
g.region raster=landuse96_28m,aspect -p r.what map=landuse96_28m,aspect coordinates=633614.08,224125.12,632972.36,225382.87 -f 633614.08|224125.12||2|Low Intensity Developed|209.5939|209 degrees ccw from east 632972.36|225382.87||15|Southern Yellow Pine|140.7571|140 degrees ccw from east
g.region raster=boundary_county_500m -p r.what map=boundary_county_500m points=comm_colleges 145096.859150|154534.264884||39 616341.437150|146049.750884||51 ...
g.region raster=boundary_county_500m -p r.what map=boundary_county_500m points=comm_colleges -v 1|145096.859150|154534.264884||39 2|616341.437150|146049.750884||51 ...
g.region raster=boundary_county_500m -p r.what map=boundary_county_500m points=comm_colleges \ separator=comma output=result.csv -n cat result.csv easting,northing,site_name,boundary_county_500m 145096.859150,154534.264884,,39 616341.437150,146049.750884,,51 410595.719150,174301.828884,,71 ...
cat input_coord.txt 633614.08 224125.12 site 1 632972.36 225382.87 site 2 r.what map=landuse96_28m,aspect < input_coord.txt 633614.08|224125.12|site 1|2|209.5939 632972.36|225382.87|site 2|15|140.7571
r.what map=landuse96_28m,aspect << EOF 633614.08 224125.12 site 1 632972.36 225382.87 site 2 EOF 633614.08|224125.12|site 1|2|209.5939 632972.36|225382.87|site 2|15|140.7571
echo "633614.08 224125.12" | r.what map=landuse96_28m,aspect 633614.08|224125.12||2|209.5939
v.out.ascii comm_colleges separator=space | r.what map=boundary_county_500m 145096.8591495|154534.26488388|1|39 616341.4371495|146049.75088388|2|51 410595.7191495|174301.82888388|3|71 ...
r.what -f map=landuse96_28m,aspect << EOF 633614.08 224125.12 site 1 632972.36 225382.87 site 2 EOF 633614.08|224125.12|site 1|2|Low Intensity Developed|209.5939|209 degrees ccw from east 632972.36|225382.87|site 2|15|Southern Yellow Pine|140.7571|140 degrees ccw from east
Last changed: $Date$