[Solved] group given list elements using certain criteria
[ad_1] The only thing I could think of was to iterate over all polygons, and then loop over all the other polygons to find intersections. (Which means the algorithm has a quadratic run time complexity.) Inefficient, but it gets the job done. result = [] for i, shape in enumerate(polys): intersected_shapes = [poly for poly … Read more