[R-sig-Geo] 'Customizing' spsample
Jean-Paul Kibambe Lubamba
jean-paul.kibambe at uclouvain.be
Fri Nov 27 16:01:36 CET 2009
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
More information about the R-sig-Geo
mailing list