GenerateCircuitousDistance: Converts a Points File into a Distance Matrix Using the...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function calculates the straight line distance beween a set of geographical coordinates and generates a matrix containing the distances between each of the locations (i.e. receivers/stations) minus the detection radius. This function works in series through a set of locations and may contain waypoints to create indirect paths.

Usage

1

Arguments

sPointsFile

a dataframe containing the LOCATION (i.e. the STATIONNAME or the RECEIVERID), the coordinates and the detection RADIUS in meters. This should be in the format LOCATION, LATITUDE, LONGITUDE, RADIUS. Waypoints connecting receivers/stations in series should be located between the relevent locations and have a LOCATION = 0

Value

DM

a 2x2 matrix containing the pairwise circuitous DISTANCE between each LOCATION minus the detection RADIUS. Distances are returned in kilometers

Author(s)

Ross Dwyer, Mathew Watts, Hamish Campbell

See Also

GenerateDirectDistance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Load the points file
data(PointsCircuitous_crocs)

# Generate the Circuitous Distance Matrix
CircuitousDM <- GenerateCircuitousDistance(PointsCircuitous_crocs)

# Now plot example of how circuitous distances between receivers were generated
# In this example an individual must follow the course of the river in order to
#   move between receivers
par(mfrow=c(1,1),las=1,bty="l")
plot(PointsCircuitous_crocs$LONGITUDE,PointsCircuitous_crocs$LATITUDE,
    pch=1,cex=0.5,col="grey",xlab="Longitude",ylab="Latitude")
lines(PointsCircuitous_crocs$LONGITUDE,PointsCircuitous_crocs$LATITUDE,
      col="grey",lwd=0.3,lty=3)

Receiversonly <- na.omit(PointsCircuitous_crocs)
points(Receiversonly$LONGITUDE,Receiversonly$LATITUDE,pch=10,cex=1)

VTrack documentation built on May 2, 2019, 9:16 a.m.