Gets the linear distance between the first point of patch i
and
the last point of the previous patch patch i - 1
.
Distance is returned in metres.
This function is used internally by other functions, and rarely on its own.
Arguments
- data
A dataframe of or extending the class data.frame, such as a data.table. This must contain two pairs of coordinates, the start and end X and Y coordinates of a feature.
- x1
The first X coordinate or longitude; for inter-patch distances, this is the last coordinate (x_end) of a patch \(i\).
- x2
The second X coordinate; for inter-patch distances, this is the first coordinate (x_start) of a subsequent patch \(i + 1\).
- y1
The first Y coordinate or latitude; for inter-patch distances, this is the last coordinate (y_end) of a patch \(i\).
- y2
The second Y coordinate; for inter-patch distances, this is the first coordinate (y_start) of a subsequent patch \(i + 1\).