Skip to content

Commit

Permalink
Update GeometryOpsFlexiJoinsExt.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 authored Oct 25, 2024
1 parent 9fcf9b7 commit deaabc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ext/GeometryOpsFlexiJoinsExt/GeometryOpsFlexiJoinsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ FlexiJoins.supports_mode(::FlexiJoins.Mode.Tree, ::FlexiJoins.ByPred{F}, datas)

FlexiJoins.prepare_for_join(::FlexiJoins.Mode.Tree, X, cond::FlexiJoins.ByPred{<: GO_DE9IM_FUNCS}) = (X, SortTileRecursiveTree.STRtree(map(cond.Rf, X)))
function FlexiJoins.findmatchix(::FlexiJoins.Mode.Tree, cond::FlexiJoins.ByPred{F}, ix_a, a, (B, tree)::Tuple, multi::typeof(identity)) where F <: GO_DE9IM_FUNCS
# Implementation note:
# here, `a` is a row, and `b` is the full table.
# We extract the relevant columns using cond.Lf and cond.Rf.
idxs = SortTileRecursiveTree.query(tree, cond.Lf(a))
intersecting_idxs = filter!(idxs) do idx
cond.pred(a, cond.Rf(B[idx]))
cond.pred(cond.Lf(a), cond.Rf(B[idx]))
end
return intersecting_idxs
end
Expand Down

0 comments on commit deaabc2

Please sign in to comment.