I have 100 polygons in a GeoJSON file that partially overlap each other. I would like to produce 100 new polygons as follows:
- The area covered by any of the original 100. This is their union.
- The area covered by at least two of the original 100.
- ...
- The area covered by all but one of the original 100.
- The area covered by all of the original 100. This is their intersection.
(I'm actually going to only keep 5-10 of these 100 results, but I expect the process for generating all 100 of them is the same as generating a subset of them)
What software / functions can I use to do this?
One approach I've already encountered in another similar project involves rasterizing all of the original polygons, then counting the overlapping pixels and producing new polygons from that data. This approach loses precision earlier than I would like to (I want to maintain near perfect precision up until the end of the process, THEN simplify things for display).
I could do this semi-manually with hundreds of union and intersection operations. This approach is not ideal because I want to re-run this process at intervals in the future as the dataset grows.
No comments:
Post a Comment