#12287 closed Bugs (fixed)

rtree.query(bgi::contains(point), std::back_inserter(result)) fails

Reported by: martin.liebenberg@… Owned by: Barend Gehrels
Milestone: Boost 1.62.0 Component: geometry
Version: Boost 1.61.0 Severity: Problem
Keywords: index, rtree Cc:


When adding several points to an rtree, a query with bgi::contains(point) fails for some of these points. The reason seems to be that rtree.insert(point) expands a box in the rtree in boost/geometry/algorithms/expand.hpp so that the coordinate of a point can lie on the edge of a box. A query with bgi::contains(point) then checks with boost::geometry::strategy::within::within_range::apply(Value1 const& value, Value2 const& min_value, Value2 const& max_value) value > min_value && value < max_value so that a point on the edge of a box is not captured. The probability of the concurrency of this failure depends on the number of inserted points and the template value of the compile-time parameters of rtree as for instance in bgi::linear<32>. The greater the template parameter, the more points can be added until the failure occurs.

Attachments (1)

test_rtree_insert.cpp (1.2 KB) - added by martin.liebenberg@… 15 months ago.
boost test for the rtree insert and the contains-query

Download all attachments as: .zip

Change History (2)

Changed 15 months ago by martin.liebenberg@…

Attachment: test_rtree_insert.cpp added

boost test for the rtree insert and the contains-query

comment:1 Changed 15 months ago by awulkiew

Milestone: To Be DeterminedBoost 1.62.0
Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Barend Gehrels.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.