[R-sig-Geo] Intersect shapefiles

Worrall, James -FS jworrall at fs.fed.us
Thu Feb 18 16:55:06 CET 2016

I would have thought gUnaryUnion, but then I can't understand from the documentation what the difference is between that and gIntersection.

-----Original Message-----
From: R-sig-Geo [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of chris english
Sent: Thursday, February 18, 2016 7:24 AM


As Loic suggests, rgeos::gIntersection will get you there. Look closely at his naming of objects and your example code using spTransform. With his approach, each object has its own name; whereas your approach overwrites Rain_poly_merge the second and third time and the final object (third) is the 2008 maize yield. So read your shapefiles into differently named objects and use Loic's approach.


This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.

More information about the R-sig-Geo mailing list