## NAME

v.distance - Calculates distance from a point to nearest line or point in vector layer.
(GRASS Vector Program)

## SYNOPSIS

v.distance
v.distance help
v.distance map=name [east_north=east,north[,east,north,...]

## DESCRIPTION

v.distance uses a binary vector file (map=name) and user specified coordinates to calculate the distance from the given point(s) to the nearest line or point in vector layer.

### Parameters:

map=name
  Name of a binary vector file.
east_north=
  One or multiple coordinate pairs for query

v.distance can be run either non-interactively or interactively but interactive user input is required to define the points to calculate the distance from.

## EXAMPLE

To calculate the distance of given sites to the next road, run:
`s.out.ascii -d archsites | v.distance roads`

To calculate the distance of given sites to the next road and store the list as new sites map with distance attribute and vector attribute number, run:
`s.out.ascii -d archsites | v.distance roads | s.in.ascii fs='|' sites=dist`
The output structure is: `E|N|sitesID|dist|vect_line_ATT`

e.g. `1680949.350649|5100196.753247|31|16.854858|22002`

## SEE ALSO

r.distance

## AUTHOR

Janne Soimasuo 1994, Finland
University of Joensuu, Faculty of Forestry, Finland

Cmd line coordinates support: Markus Neteler, ITC-irst, Trento, Italy

Last changed: $Date: 2002/02/08 13:46:12 $