Displaying 1 result from an estimated 1 matches for "dist_m".
Did you mean:
dist_
2006 Oct 07
1
random point in a circle centred in a geographical position
...a random x coordinate
>x_rdm<-coord$x_utm[1]+radius*cos(angle)
#Generate a random y coordinate
>y_rdm<-coord$y_utm[1]+radius*sin(angle)
>result<-as.data.frame(cbind(x_rdm,y_rdm, x_utm, y_utm))
# We can calculate the distance between the original and the random location
> result$dist_m<-sqrt(((coord$x_utm-result$x_rdm)^2+(coord$y_utm-result$y_rdm)^2))
>result