On Wed, 11 Apr 2018, 2:54 AM Adam Wulkiewicz via Geometry
For your case it'd
be bg::intersects() for both nodes (boxes) and values
(points) as the first parameter and your segment as
the second parameter.
I'm not sure what do you mean by "right-hand side of
the query segment", the whole "half" of space on the
right side of the line defined by segment or a region
enclosed by the segment and 2 perpendicular half-lines
starting at segment endpoints and going in some
direction. Writing the comments below I assumed the
latter. If you had the former in mind then sideness
test (as performed by side strategy) would be enough.
Yes, I meant the first interpretation, the
infinite 'half-space' that is not on the left-hand side nor
collinear with the query segment, although we can ignore
collinearity for simplicity.
Btw, using the
cartesian side strategy the side of a point wrt line
defined by segment can be checked like this:
// left of segment
(> 0), right of segment (< 0), on segment (0)
int side = boost::geometry::strategy::side::side_by_triangle<>::apply(segment_p1,
Aha, so that's what I need, but how can I pass
that as a predicate to the rtree? Also by writing a custom
predicate that basically just calls it?