I am able to generate random points within the polygons using the package sp
, however I am interested in generating points along the outline of the polygon.
For example, if I have a shapefile of a lake I can use spsample(lake,n=10,type="random")
to generate 10 random locations within this lake. I am looking to do a similar thing but instead of generating the locations within the lake, I want the points to simply be along the shoreline. Is there a simple way to do this that I am just missing?