finding shortest distance between two points around waterways in r

299 Views Asked by At

Looking for some advice on the best approach to this problem. I need make a matrix of pairwise OVER LAND shortest distance between each pair of points for 309 points (see figure below).

An approach I was thinking of following was creating a shapefile of the entire area in question and rasterizing it and using the gdistance library to somehow convert waterways to a 'high cost' barrier and land to 'low cost' and then finding least cost paths. And then finding a way to put that in matrix form. Or if there's a way to do this just by telling R to stay within a shapefile?

Any suggestions would be very helpful! Thanks

example of shortest distance between two points

0

There are 0 best solutions below