[R-sig-Geo] subsetting a WKT Multilinestring

Philip A. Viton viton.1 at osu.edu
Mon Apr 22 19:04:33 CEST 2013


Consider:

library(rgeos)
mls<-readWKT("MULTILINESTRING((3 4, 10 50, 20 25),(30 30, 70 50, 24 55)
              ,(30 12, 50 5, 65 7))")

mls is, as expected, a SpatialLines object, and
plotting it shows that indeed it has three individual
lines. My question is: is there some way to subset this
object so as to obtain a smaller SpatialLines object?
(say, by excluding the second Line)?

------------------------
Philip A. Viton
City Planning, Ohio State University
275 West Woodruff Avenue, Columbus OH 43210
viton.1 at osu.edu



More information about the R-sig-Geo mailing list