Compute distance between a point and a line
get_dist_point_line(point, line_coord1, line_coord2)
2D or 3D coordinates of the point as c(x,y) or c(x,y,z)
2D or 3D coordinates of one point on the line as c(x,y) or c(x,y,z)
2D or 3D coordinates of a second point on the line as c(x,y) or c(x,y,z)
A numeric vector of length 1 that provides the euclidean distance between the point and the line.
The function accepts 2D coordinates or 3D coordinates, but note that the dimensions of all supplied arguments must match; all coordinates must be 2D or they all must be 3D.
Vikram B. Baliga