Description Usage Arguments Value Author(s) See Also Examples
This function calculates the straight line distance between a set of geographical coordinates and generates a matrix containing the distances between each of the points (i.e. receivers) minus the detection radius.
1 | GenerateDirectDistance(sPointsFile)
|
sPointsFile |
a dataframe containing the |
a 2x2 matrix containing the pairwise direct DISTANCE
between each LOCATION
minus the detection RADIUS
. Distances are returned in kilometers
Ross Dwyer, Mathew Watts, Hamish Campbell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Load the points file
data(PointsDirect_crocs)
# Generate the direct distance matrix
DirectDM <- GenerateDirectDistance(PointsDirect_crocs)
# Now plot example of how direct distances between receivers were generated
# In this example there are no structural boundary preventing an individual from
# moving between receivers
par(mfrow=c(1,1),las=1,bty="l")
plot(PointsDirect_crocs$LONGITUDE,PointsDirect_crocs$LATITUDE,pch=10,cex=1,
xlab="Longitude",ylab="Latitude")
for(i in 1:length(PointsDirect_crocs$LONGITUDE))
{
lines(PointsDirect_crocs$LONGITUDE[c(1,i)],PointsDirect_crocs$LATITUDE[c(1,i)],
lwd=0.3,col="grey",lty=3)
}
points(PointsDirect_crocs$LONGITUDE,PointsDirect_crocs$LATITUDE,pch=10,cex=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.