Replies: 1 comment
-
Thanks @drkirkham. I think this addition would be welcome if you'd like to contribute a pull request. I think this check could always be done first as a default part of the algorithm as you said, rather than as an option. I'm surprised turf doesn't have a bboxOverlap module already. That would make a good improvement in the future. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The idea of Boolean Intersects is the opposite of Boolean Disjoint - i.e. finding if two objects do not intersect at all.
The problem is that Boolean Intersects is slow. This is because it is simply the opposite of Boolean Disjoint in the code. If one has a complex object, then this search takes a long time.
I would propose modifying the algorithm so that it first compared based on a bounding box, and only if the bounding boxes intersect then one would actually do the more detailed comparison. Based on my experiments on my own dataset, this was a considerable speed up. The precise speed up depends on the scenario, but it is capable of being over an order of magnitude.
I'd be happy to add this in if it was supported, either as an option, or simply the algorithm used.
Beta Was this translation helpful? Give feedback.
All reactions