-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Optimise processing clip algorithm
Before the algorithm was written to optimise clipping a few features against thousands of mask features. The revised algorithm is optimised for clipping thousands of input features against a few mask features. Given that this second operation is much more likely, it makes sense to optimise for this use case. I've also applied some other optimisations like taking advantage of spatial indexes on the providers, using prepared geometries and also only applying an intersection operation if the geometry isn't wholly contained by the mask geometry. Benchmarks: clipping roads layer with 1 million lines against 2 polygons before: 5 mins 30 seconds after: 10 seconds clipping address layer with 5 million points against 2 polygons before: 50 minutes after: 30 seconds (cherry-picked from 71ebdb8)
- Loading branch information
1 parent
e0d3bcb
commit fe6401e
Showing
4 changed files
with
79 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters