Skip to content

optimize decomposing clip calls #8

@tcql

Description

@tcql

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions