[R-sig-Geo] Area of overlap between 2 polygons
Rolf Turner
r.turner at auckland.ac.nz
Sat Sep 10 01:14:35 CEST 2011
On 10/09/11 08:31, Ryan Briscoe Runquist wrote:
> Dear All,
>
> I am new to spatial analysis in R, and I wanted to know if anyone could help
> me. I am interested in finding the area of overlap between the ranges of 2
> species. I have downloaded herbarium record data for a genus of plants that
> includes species names and the lat/long coordinates of the record. I would
> like to be able to compute:
> the minimum convex polygon for each species (I have been able to do this
> with earth.poly{fossil}),
> the area of that polygon (also obtainable through earth.poly{fossil}),
> and the centroid coordinate of the polygon.
>
> I would then like to take these polygons and determine the pairwise area of
> overlap between all species combination and the distance between centroids.
> I have not been able to find a function that will help me do this. Is there
> a function for this type of analysis and what class of data do I need to
> make this work. Thank you in advance for any assistance.
The undocumented functions overlap.owin() and overlap.xypolygon()
in the "spatstat" package should do what you want.
cheers,
Rolf Turner
More information about the R-sig-Geo
mailing list