[R-sig-Geo] Intersect shapefiles

chris english englishchristophera at gmail.com
Thu Feb 18 19:49:42 CET 2016


And so for John 's completion we should ask: Union or intersection? I
assume union but of course could be wrong. What i especially like about the
sp and rgeos documentation is that if you take the time to run the examples
in the documentation you just might see your use case. Or, rather likely.
Chris
On Feb 18, 2016 8:11 PM, "Worrall, James -FS" <jworrall at fs.fed.us> wrote:

> Such a clear and simple explanation - thank you.  I wish the function
> documentation was written like that.
>
> -----Original Message-----
> From: Alex Mandel [mailto:tech_dev at wildintellect.com]
> Sent: Thursday, February 18, 2016 9:59 AM
> To: Worrall, James -FS <jworrall at fs.fed.us>; chris english <
> englishchristophera at gmail.com>; A. Marcia BARBOSA <barbosa at uevora.pt>
> Cc: Help R-Sig_Geo <r-sig-geo at r-project.org>
> Subject: Re: [R-sig-Geo] Intersect shapefiles
>
> Union creates a merged shape including all parts of input objects.
>
> Intersection creates a shape of the overlapping portions of input objects.
>
> I'm not clear on the goal from the initial email so I don't know which is
> better in this case.
>
> Enjoy,
> Alex
>
> On 02/18/2016 07:55 AM, Worrall, James -FS wrote:
> >
> > 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
> >
> > John,
> >
> > 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.
> >
> > Chris
> >
> >
> >
> >
> >
> > 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.
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list