boostorg / boostorg/geometry

Proposal: Add OR operator to predicates (Rtree)

Open
#593 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
517
Forks
232
PR merge metrics
No merged PRs in 30d

Description

Hello,

Using Rtree, I fell into the case where I need to know whether a box is within another box OR overlaps it. The current implementation doesn't allow this operation.
In my understanding, I can't see any reason not to allow it, as AND and NOT are allowed.
We can't even use De Morgan's law (`A || B = !(!A && !B)`) as we can't negate a whole expression (AND operator returns a boost::tuples::cons and not another predicate with the NOT operator implemented).

Maybe there is a limitation I can't see, if there is, I'll be happy to know it ;)
Thanks !

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.