Skip to content
Prev 7045 / 29559 Next

'Customizing' spsample

Hello everybody,

I am using 'spsample' to derive points along a line and it works perfectly
by doing the following :

xx <- readShapeLines("line2",proj4string=CRS("+proj=utm +zone=34
+datum=WGS84"))
sppts <- spsample(xx, n=50, type="random")
plot(sppts)

However, I was wondering if the user can somehow 'customize' the sampling
process, as for example, by separating sampling points by a given
distance. And this distance being in the same units as the line. The 'n'
argument in spsample will therefore vary according with the length of each
line.

Any help is welcome!


Jean-Paul