Boost C++ Libraries: Ticket #12413: boost::geometry::index::rtree.remove() with Geographic coordinate system can fail https://svn.boost.org/trac10/ticket/12413 <p> example code: </p> <pre class="wiki">#include &lt;boost\config\compiler\visualc.hpp&gt; #include &lt;boost/geometry/index/rtree.hpp&gt; #include &lt;boost/geometry.hpp&gt; #include &lt;boost/geometry/geometries/geometries.hpp&gt; namespace bgi = boost::geometry::index; namespace bg = boost::geometry; typedef bg::model::point&lt;double, 2, bg::cs::geographic&lt;bg::degree&gt; &gt; Geo2DPoint; typedef std::pair&lt; Geo2DPoint, unsigned &gt; RTreeValue; typedef bgi::rtree&lt;RTreeValue, bgi::quadratic&lt;5&gt; &gt; rtree_t; typedef boost::geometry::model::box&lt; Geo2DPoint &gt; GeoBox; int main() { rtree_t rtree; Geo2DPoint p; p.set&lt;0&gt;( -1.558444 ); p.set&lt;1&gt;( 52.38664 ); rtree.insert( std::make_pair( p, 792) ); p.set&lt;0&gt;( -1.558444 ); p.set&lt;1&gt;( 52.38664 ); rtree.insert( std::make_pair( p, 793 ) ); p.set&lt;0&gt;( -2.088824 ); p.set&lt;1&gt;( 51.907406 ); rtree.insert( std::make_pair( p, 800 ) ); p.set&lt;0&gt;( -1.576363 ); p.set&lt;1&gt;( 53.784089 ); rtree.insert( std::make_pair( p, 799 ) ); p.set&lt;0&gt;( -77.038816 ); p.set&lt;1&gt;( 38.897282 ); rtree.insert( std::make_pair( p, 801 ) ); p.set&lt;0&gt;( -1.558444 ); p.set&lt;1&gt;( 52.38664 ); rtree.insert( std::make_pair( p, 794 ) ); p.set&lt;0&gt;( -0.141588 ); p.set&lt;1&gt;( 51.501009 ); rtree.insert( std::make_pair( p, 797 ) ); p.set&lt;0&gt;( -118.410468 ); p.set&lt;1&gt;( 34.103003 ); rtree.insert( std::make_pair( p, 798 ) ); p.set&lt;0&gt;( -0.127592 ); p.set&lt;1&gt;( 51.503407 ); rtree.insert( std::make_pair( p, 796 ) ); size_t num_removed = rtree.remove( std::make_pair( p, 796 ) ); // Here, num_removed should be 1 but it is 0 return 0; } </pre><p> as the comment says, num_removed should be 1 but it is 0 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12413 Trac 1.4.3 anonymous Fri, 26 Aug 2016 09:25:36 GMT component changed; owner set https://svn.boost.org/trac10/ticket/12413#comment:1 https://svn.boost.org/trac10/ticket/12413#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Barend Gehrels</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">geometry</span> </li> </ul> Ticket awulkiew Mon, 29 Aug 2016 10:14:28 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12413#comment:2 https://svn.boost.org/trac10/ticket/12413#comment:2 <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> Related to: <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/12412"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/12412</a> </p> <p> Fix: <a class="ext-link" href="https://github.com/boostorg/geometry/commit/0fb9e297acc77912255e22fbfd16ac2f18e25c57"><span class="icon">​</span>https://github.com/boostorg/geometry/commit/0fb9e297acc77912255e22fbfd16ac2f18e25c57</a> </p> Ticket awulkiew Tue, 06 Dec 2016 23:59:24 GMT milestone changed https://svn.boost.org/trac10/ticket/12413#comment:3 https://svn.boost.org/trac10/ticket/12413#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.62.0</span> → <span class="trac-field-new">Boost 1.63.0</span> </li> </ul> Ticket