Skip to content

Optimize overlay operations with envelope checks and R-Tree indexing#693

Merged
peterstace merged 1 commit intomasterfrom
optimize_disjoint_envelope_overlay
Feb 1, 2026
Merged

Optimize overlay operations with envelope checks and R-Tree indexing#693
peterstace merged 1 commit intomasterfrom
optimize_disjoint_envelope_overlay

Conversation

@peterstace
Copy link
Owner

Description

Add early exit for Intersection when envelopes are disjoint, returning an empty result of the appropriate dimension without calling the JTS port.

Replace O(M*N) nested loops in gcAwareIntersection and gcAwareDifference with R-Tree indexed lookups for O(M log N) complexity.

Check List

Have you:

  • Added unit tests? N/A (optimization, no functional change)

  • Add cmprefimpl tests? (if appropriate?) N/A

  • Updated release notes? (if appropriate?) Yes.

  • Updated the README.md (if new functionality is added?) N/A

Related Issue

Benchmark Results

TODO

Click to expand
PASTE BENCHMARKS HERE

Add early exit for Intersection when envelopes are disjoint, returning
an empty result of the appropriate dimension without calling the JTS port.

Replace O(M*N) nested loops in gcAwareIntersection and gcAwareDifference
with R-Tree indexed lookups for O(M log N) complexity.
@peterstace peterstace self-assigned this Feb 1, 2026
@peterstace peterstace merged commit cd19549 into master Feb 1, 2026
1 check passed
@peterstace peterstace deleted the optimize_disjoint_envelope_overlay branch February 1, 2026 17:39
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