1

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

  • Related: [Finding euclidean distance in R{spatstat} between points, confined by an irregular polygon window](https://stackoverflow.com/questions/22947448/finding-euclidean-distance-in-rspatstat-between-points-confined-by-an-irregul), [How do I get the shortest route in a labyrinth?](https://stackoverflow.com/questions/33286252/how-do-i-get-the-shortest-route-in-a-labyrinth?noredirect=1&lq=1). Please also note that by providing a _minimal_ example data set you make it easier for people to try out their solutions, and thereby much more tempting to help you. Cheers. – Henrik Jun 11 '20 at 17:18

0 Answers0