What's the difference between intersect{raster} and gIntersection{rgdal} in polygons

المشرف العام

Administrator
طاقم الإدارة
I am interesting in difference between tools **intersect {raster} and gIntersection {rgdal} tools in R. I have several ovelapping 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 {rgdal}.

Please, 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 satisfied for my purpose as it keep "SpatialPolygonsDataFrame" (SPDF) and even merge polygons' data.frames. However many online helps propose instead gIntersection {rgdal} which produce just "SpatialPolygons" not even "SPDF". There is not really difference in computation time.

Thank you !



أكثر...
 
أعلى