Compute total area of several polygons within a polygon

المشرف العام

Administrator
طاقم الإدارة
I have joined a dataset containing the polygons of green spaces, with a dataset containing vegetation polygons using intersect. The result is a dataset with separate entries for each vegetation polygon within the green spaces. Looking like this:



What I want is the total area of each vegetation type within each of the green spaces, similar to this (this table came from a trial using the tabulate areas, right format but wrong areas):



What would be the best way to achieve that, using python? The area would have to be calculated for each vegetation type (GRIDCODE) within each Green space. The areas are then meant to be attached to my original dataset containing a lot more information about the green spaces.I've tried using a loop to compute it separately for each row, but did not get it to work.



أكثر...
 
أعلى