[Boost.Geometry] Extend spatial predicates to 1D segments?
Hi,
I'm using the rtree in Boost.Geometry to store one-dimensional intervals
(as segments of one-dimensional points). There may be better suited
libraries out there for this task, but I had Boost.Geometry in my
project for some 2D-Rtree anyways, and since it is generic, it should be
up to the task.
I needed to query the 1D segments in the rtree for overlaps and got a
nasty looking "not implemented" error when trying to compile. Basically,
this is what I tried to do:
typedef bgm::point
On Wed, Feb 17, 2016 at 7:28 AM, Lukas Barth
I'm using the rtree in Boost.Geometry to store one-dimensional intervals (as segments of one-dimensional points). There may be better suited libraries out there for this task,
[OT] Perhaps Boost's own Interval Arithmetic Library ? --DD http://www.boost.org/doc/libs/1_60_0/libs/numeric/interval/doc/interval.htm
Hi Lukas, Lukas Barth wrote:
I needed to query the 1D segments in the rtree for overlaps and got a nasty looking "not implemented" error when trying to compile. <snip> template
struct disjoint : detail::disjoint::disjoint_segment {}; And, more importantly, I did not find a similar piece of code with a "1" as third template parameter. Thus, I assume that the 'disjoint' predicate is just not implemented for one-dimensional segments.
Yes, that's the correct place.
I added that predicate for my project, and now I'm wondering whether a full set of spatial predicates would be desirable for one-dimensional segments.
In other words: If I came up with a patch adding those predicates, would it be considered?
Every contribution would be appreciated. :) If you needed help: https://github.com/boostorg/geometry/wiki/Contribution-Tutorial With that said, note that in 1D a Segment would be the same as a Box. So you could store 1D Boxes instead and everything should work fine. AFAIR all predicates are implemented for ND cartesian Boxes. Regards, Adam
participants (3)
-
Adam Wulkiewicz
-
Dominique Devienne
-
Lukas Barth