An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110520/e6338c9c/attachment.pl>
Intersection of polygons and polylines
2 messages · Rija FANIRIANTSOA, Barry Rowlingson
On Fri, May 20, 2011 at 10:53 AM, Rija FANIRIANTSOA
<frijaf1 at mail2science.com> wrote:
L<-SpatialLines(list(Lines(list(Line(cbind(c(7,6,5,4.2,3,2.8,1), c(4,3.5,3,2.8,2.5,1.8,1)))),"l1")))
> require(rgeos)
> gIntersects(L,polyg,byid=TRUE)
l1
p1 FALSE
p2 FALSE
p3 TRUE
p4 TRUE
- that gives you T/F for intersections of L with the polygons in
polyg. Job almost done!
Barry