line.distance {RGeostats} | R Documentation |
Calculate the distance between two points through the projection on a broken line
line.distance(x1, y1, x2, y2, xl, yl, ap=1, al=0)
x1 |
Coordinate along X of the first point |
y1 |
Coordinate along Y of the first point |
x2 |
Coordinate along X of the second point |
y2 |
Coordinate along Y of the second point |
xl |
Array of coordinates along X of the broken line |
yl |
Array of coordinates along Y of the broken line |
ap |
Coefficient applied to the distance between the first point and its projection on the polyline. |
al |
Coefficient applied to the distance between the projections of the two points on the polyline. |
The minimum distance between points P1 and P2, when going through the broken line