Boost C++ Libraries: Ticket #12287: rtree.query(bgi::contains(point), std::back_inserter(result)) fails https://svn.boost.org/trac10/ticket/12287 <p> 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&amp; value, Value2 const&amp; min_value, Value2 const&amp; max_value) value &gt; min_value &amp;&amp; value &lt; 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&lt;32&gt;. The greater the template parameter, the more points can be added until the failure occurs. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12287 Trac 1.4.3 martin.liebenberg@… Sun, 19 Jun 2016 13:41:03 GMT attachment set https://svn.boost.org/trac10/ticket/12287 https://svn.boost.org/trac10/ticket/12287 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_rtree_insert.cpp</span> </li> </ul> <p> boost test for the rtree insert and the contains-query </p> Ticket awulkiew Wed, 22 Jun 2016 15:23:01 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12287#comment:1 https://svn.boost.org/trac10/ticket/12287#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.62.0</span> </li> </ul> <p> Thanks! </p> <p> Fix: <a class="ext-link" href="https://github.com/boostorg/geometry/commit/7ec2706d50b59b198331e97700c130fdc46ccd0a"><span class="icon">​</span>https://github.com/boostorg/geometry/commit/7ec2706d50b59b198331e97700c130fdc46ccd0a</a> </p> Ticket