-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Because clipping with GH means decomposing to pairwise clip calls, there's a lot of looping and array modification in some of the operations. This can result in very slow operations when you have complex inputs, such as very large multipolygons.
I think we could optimize this a lot by doing some checks before looping over and clipping shapes multiple times. For instance, I think we could detect whether two shapes are touching in advance, and maybe even keep an internal index of shape relationships internally so consecutive internal GH calls won't have to do lots of useless legwork.