Opened 6 years ago

Closed 6 years ago

#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:

Description

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@… 6 years ago.
boost test for the rtree insert and the contains-query

Download all attachments as: .zip

Change History (2)

by martin.liebenberg@…, 6 years ago

Attachment: test_rtree_insert.cpp added

boost test for the rtree insert and the contains-query

comment:1 by awulkiew, 6 years ago

Milestone: To Be DeterminedBoost 1.62.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.