Dear all, I'd like to take two shapefiles and to calculate the area of overlap based on some world projection. Any suggestions about possible functions? Thanks! Karla
overlap between shapefiles
3 messages · Karla Shikev, MacQueen, Don, Philippi, Tom
In the rgeos package there are gIntersects() and gIntersection(), that might be enough to get you started. -Don
Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 5/8/15, 10:46 AM, "Karla Shikev" <karlashikev at gmail.com> wrote: >Dear all, > >I'd like to take two shapefiles and to calculate the area of overlap based >on some world projection. Any suggestions about possible functions? > >Thanks! > >Karla > > [[alternative HTML version deleted]] > >_______________________________________________ >R-sig-Geo mailing list >R-sig-Geo at r-project.org >https://stat.ethz.ch/mailman/listinfo/r-sig-geo
To add to Don's recommendation, after you have the 3rd SpatialPolygons object of the overlap or intersection, you may need to spTransform() them to a projection where area makes sense, then use rgeos::gArea to compute the areas. Which projections to use depends on the spatial scale and general location of your rangemaps: there is no single best answer. Tom 2
On Fri, May 8, 2015 at 12:10 PM, MacQueen, Don <macqueen1 at llnl.gov> wrote:
In the rgeos package there are gIntersects() and gIntersection(), that might be enough to get you started. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 5/8/15, 10:46 AM, "Karla Shikev" <karlashikev at gmail.com> wrote:
Dear all,
I'd like to take two shapefiles and to calculate the area of overlap based
on some world projection. Any suggestions about possible functions?
Thanks!
Karla
[[alternative HTML version deleted]]
_______________________________________________ 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