Re: [R-sig-Geo] subsetting a WKT Multilinestring

2013-04-22 Thread Roger Bivand
On Mon, 22 Apr 2013, Philip A. Viton wrote: Consider: library(rgeos) mls<-readWKT("MULTILINESTRING((3 4, 10 50, 20 25),(30 30, 70 50, 24 55) ,(30 12, 50 5, 65 7))") length(mls) #[1] 1 mls1<-readWKT("GEOMETRYCOLLECTION(LINESTRING(3 4, 10 50, 20 25), LINESTRING(30 30, 70 50, 24 5

Re: [R-sig-Geo] subsetting a WKT Multilinestring

2013-04-22 Thread Edzer Pebesma
On 04/22/2013 07:04 PM, Philip A. Viton wrote: > 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 individ

[R-sig-Geo] subsetting a WKT Multilinestring

2013-04-22 Thread Philip A. Viton
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 obje