Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up hole nesting #20

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

rjmac
Copy link
Contributor

@rjmac rjmac commented Jan 5, 2021

With large polygons and lots of holes, this can be extremely slow, so
I've converted it to Rust and done some optimization on the contains
raycast. For the problematic shapefile that exposed this, processing
was a bit under 50x slower than with the Rust code.

With large polygons and lots of holes, this can be _extremely_ slow, so
I've converted it to Rust and done some optimization on the contains
raycast.  For the problematic shapefile that exposed this, processing
was a bit under 50x slower than with the Rust code.
If there's a multipolygon with more than one polygon and a hole that
doesn't fit in any of them, the Elixir version will attach the hole to
the last polygon.
This doesn't actually seem to matter, but it's good hygiene
This improves the runtime of the problematic shapefile by another third.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant