[R-sig-Geo] split/divide SpatialLines (sp) into n segments

Omphalodes Verna omphalodes.verna at yahoo.com
Tue Apr 9 07:09:22 CEST 2013


Dear list!

I would like to split/divide SpatialLines into n segments. Is there any function to do this in R? Or does somebody know the solution for that?

Here is example of SpatialLines from the sp vignette:

library(sp)
Sl = SpatialLines(list(Lines(list(Line(cbind(c(1,2,3),c(3,2,2)))), ID="a")))
plot(Sl)
coordinates(Sl)

Thanks to all, OV



More information about the R-sig-Geo mailing list