powered by
This function calculates the distance of two points in a grid.
getDistance(point.a, point.b, resolution=1)
The distance of the two points as an numeric value based on geographical degrees.
A point in a grid given by its row and column.
The resolution of the grid in (geographical) degree.
Maximilian Lange, Sven Lautenbach
This function calculates the distance of two points in a grid by the Pythagorean theorem.
##initialize data point.a <- c(5,8) point.b <- c(10,3) ##calculate the distance of the two points distance <- getDistance(point.a,point.b, resolution=1) print(distance)
Run the code above in your browser using DataLab