I am interested in knowing the difference between tools: intersect
{raster} and gIntersection
{rgeos}** tools in R. I have several overlapping polygons and I am interested in their overlap, but mostly in spatially merging their attribute tables. From my resulting shp splitted in multiple polygons, I want to calculate area of each of polygons using gArea
{rgeos}.
Are there any pitfalls I should be aware of? For both intersection processes and for subsequent areas calculation?
For the moment I found intersect
{raster} more satisfactory for my purpose as it keep "SpatialPolygonsDataFrame" (SPDF) and even merge polygons data.frames. However many online helps propose instead gIntersection
{rgeos} which produces just "SpatialPolygons" not even "SPDF". There is not really difference in computation time.