[R-sig-Geo] dividing a line by points lying on it

Wolfgang wolfgang.biener at ise.fraunhofer.de
Thu Mar 26 12:23:57 CET 2015


Hi there, 

I want to divide a line into n+1 lines. The shall be divided by points lying
on it. 
Since I don't have any idea how to solve can also post the starting point of
the problem. 

Thanks for your Help 


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

set.seed(123)
sample.points <- spsample(Sl, 10, type="regular")

x11()
plot(Sl)
plot(sample.points, pch=1, col="red", add=T)



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/dividing-a-line-by-points-lying-on-it-tp7587958.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list