Expand description
Spatial join strategy: R-tree probe join.
When two collections are joined on a spatial predicate
(ST_Intersects(a.geom, b.geom)), the naive approach is nested-loop
O(N*M). With an R-tree index on one side, we get O(N * log M):
- Build R-tree on the smaller collection (or use existing index)
- For each geometry in the larger collection, R-tree range search
- For each candidate pair, apply exact predicate
This module provides the join logic; the planner decides which side to index based on collection cardinality.
Structs§
- Spatial
Join Result - Result of a spatial join between two collections.
Enums§
- Spatial
Join Predicate - Which spatial predicate to use for the join.
Functions§
- build_
join_ index - Build an R-tree from a list of (entry_id, geometry) pairs for join.
- spatial_
join - Execute a spatial join using R-tree probe.