I have a set of (~200k) polygons showing deforestation in the Amazon. Each polygon is associated with a date when the deforestation happened.
Some of them are intersecting with each other, ie. one location is covered by multiple polygons. This is an error of the dataset - one place cannot be deforested twice (within a few years' time).
Since it is not feasible to manually check and resolve each of these situations, I want to get rid of these areas. So, for every polygon of the dataset. I want to remove/cut all of its parts where it intersects with other datasets.
On the picture, the purple and yellow rectangles represent two polygons that overlap. I'd like to cut out this overlapping part from both of the polygons.
I am preferably looking for a solution in Python. I have tried but failed to come up with a reasonable solution. Since this seems like a common spatial problem I imagine there should be some alternate solutions available.