Boost C++ Libraries: Ticket #12189: R-tree spacial predicates for ring, polygon, multipolygon fail to compile https://svn.boost.org/trac10/ticket/12189 <p> It is possible to compile an *intersects* query (<a href="http://www.boost.org/doc/libs/1_60_0/libs/geometry/doc/html/geometry/spatial_indexes/queries.html#geometry.spatial_indexes.queries.spatial_predicates">http://www.boost.org/doc/libs/1_60_0/libs/geometry/doc/html/geometry/spatial_indexes/queries.html#geometry.spatial_indexes.queries.spatial_predicates</a>) on R-tree of *box*es using a *ring*, *polygon*, *multipolygon* predicates in boost 1.58.0, but not in later versions. </p> <p> Test compilation with this example: </p> <hr /> <p> #include &lt;vector&gt; #include &lt;boost/geometry.hpp&gt; #include &lt;boost/geometry/geometries/point_xy.hpp&gt; #include &lt;boost/geometry/geometries/box.hpp&gt; #include &lt;boost/geometry/geometries/polygon.hpp&gt; #include &lt;boost/geometry/index/rtree.hpp&gt; </p> <p> void testSpacialIndexing() { </p> <blockquote> <p> namespace bg = boost::geometry; namespace bgm = boost::geometry::model; namespace bgi = boost::geometry::index; </p> </blockquote> <blockquote> <p> typedef bgm::d2::point_xy&lt;double&gt; P; typedef bgm::box&lt;P&gt; B; </p> </blockquote> <blockquote> <p> P qpt; B qbox; bgm::ring&lt;P&gt; qring; bgm::polygon&lt;P&gt; qpoly; bgm::multi_polygon&lt;bgm::polygon&lt;P&gt;&gt; qmpoly; bgm::segment&lt;P&gt; qseg; bgm::linestring&lt;P&gt; qls; </p> </blockquote> <blockquote> <p> <em> spacial indexing example typedef std::pair&lt;B, int&gt; Value_t; bgi::rtree&lt;Value_t, bgi::quadratic&lt;8&gt;&gt; rtree1; </em></p> </blockquote> <blockquote> <p> std::vector&lt;Value_t&gt; found; </p> </blockquote> <blockquote> <p> <em> works for all versions rtree1.query(bgi::intersects(qpt), back_inserter(found)); rtree1.query(bgi::intersects(qbox), back_inserter(found)); rtree1.query(bgi::intersects(qseg), back_inserter(found)); rtree1.query(bgi::intersects(qls), back_inserter(found)); </em></p> </blockquote> <p> </p> <blockquote> <p> <em> does not work for 1.59 to 1.61 beta rtree1.query(bgi::intersects(qring), back_inserter(found)); rtree1.query(bgi::intersects(qpoly), back_inserter(found)); rtree1.query(bgi::intersects(qmpoly), back_inserter(found)); </em></p> </blockquote> <p> } </p> <hr /> <p> Test works with release 1.58 Test does not work with releases 1.59, 1.60, 1.61.0b1 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12189 Trac 1.4.3 mike.vasiljevs@… Fri, 13 May 2016 19:58:08 GMT attachment set https://svn.boost.org/trac10/ticket/12189 https://svn.boost.org/trac10/ticket/12189 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_issue_12189.cpp</span> </li> </ul> <p> example as cpp file </p> Ticket awulkiew Tue, 21 Jun 2016 14:44:48 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/12189#comment:1 https://svn.boost.org/trac10/ticket/12189#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/54de9f96a1b29d11e1a8044ac8fcc6accfa5201f"><span class="icon">​</span>https://github.com/boostorg/geometry/commit/54de9f96a1b29d11e1a8044ac8fcc6accfa5201f</a> </p> Ticket