I want to calculate the Euclidean distance between (2000) points scattered on an island and the shoreline. I have the points, a polygon of the island and also a polyline file of the coast in separate shapefiles. All files are georeferenced and all points are marked with x and y coordinates.
Is there a way to easily do this, preferably in a for loop so I get all the distances with a single code.
I already read that the package
mapstat is useful, but I am somehow not able to install it.
Any tips will be welcome!