NAME

v.what - Query the category contents of a (binary) vector map layer at user-selected locations.
(GRASS Vector Program)

SYNOPSIS

v.what
v.what help
v.what [-1i] map=name

DESCRIPTION

v.what outputs the category value(s) associated with user-specified location(s) in a vector map layer.

OPTIONS

If the -i flag is specified, the program activates the mouse, and expects the user to indicate the location(s) to be queried by depressing a mouse button over desired location(s) within the current geographic region in the active display frame on the graphic monitor.

If the -i flag is not used, the program expects eastings and northings to be entered from standard input. In this case, input is terminated by typing Control-D.

Flags:

-1
Identify and query just one point location.
-i
Query interactively using mouse.

Parameter:

map=name
Name of an existing binary vector map in the user's mapset search path.

EXAMPLE

Two sample v.what sessions are given below.

Although it is not necessary that the user first display a vector map to be queried in the active display frame, it is helpful to have a map displayed there for reference for interactive queries.

v.what -i map=roads.24000
After typing this, the user moves the mouse to a desired location on the displayed roads map layer, and presses the left mouse button to query the category value of the roads vector map at this location. The program then outputs the category value of a line type corresponding to this user-selected map location, for the vector map queried by the user.

The query may be repeated as often as desired using the left mouse button. The right button on the mouse is used to quit the v.what session.

Users can also use this program inside of shell scripts. For example, if the file coords contains three UTM coordinates:

599817.37 4922332.96
593512.25 4917170.38
604979.96 4921655.90
cat coords | v.what map=landcover
will return information about these three locations and then exit.

NOTES

v.what output can be redirected into a file.

d.what.rast can be used to interactively query the map category contents of multiple raster map layers at user-selected locations.

v.what was created from d.what.vect so that non-interactively queries could be made. Specifying the -i flag makes v.what behave just as d.what.vect does.

SEE ALSO

d.vect, d.what.rast, d.what.vect, g.region, and parser,

AUTHORS

Jim Hinthorn, Central Washington University, was the original author.
Dennis Finch, National Park Service
James Darrell McCauley, Agricultural Engineering, Purdue University
added the non-interactive part and renamed to v.what