Re: [R-sig-Geo] Using gIntersection to split polygons with lines

2017-06-26 Thread Edzer Pebesma
On 26/06/17 12:56, Frederico Mestre wrote: > Hello, > > I'm trying to use gIntersection() to cut a polygon ("SpatialPolygons") with > a line ("SpatialLinesDataFrame"). > > I wanted to obtain a "SpatialPolygons" object with the polygons defined by > the lines. This is what I did: > > polygons1

[R-sig-Geo] Using gIntersection to split polygons with lines

2017-06-26 Thread Frederico Mestre
Hello, I'm trying to use gIntersection() to cut a polygon ("SpatialPolygons") with a line ("SpatialLinesDataFrame"). I wanted to obtain a "SpatialPolygons" object with the polygons defined by the lines. This is what I did: polygons1 <- gIntersection(spgeom1=mypolygon, spgeom2=mylines) However