Subject: [Boost-bugs] [Boost C++ Libraries] #12189: R-tree spacial predicates for ring, polygon, multipolygon fail to compile
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-11 11:59:32
#12189: R-tree spacial predicates for ring, polygon, multipolygon fail to compile
------------------------------+---------------------------
Reporter: mike.vasiljevs@⦠| Owner: barendgehrels
Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost 1.59.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------
It is possible to compile an *intersects* query
(http://www.boost.org/doc/libs/1_60_0/libs/geometry/doc/html/geometry/spatial_indexes/queries.html#geometry.spatial_indexes.queries.spatial_predicates)
on R-tree of *box*es using a *ring*, *polygon*, *multipolygon* predicates
in boost 1.58.0, but not in later versions.
Test compilation with this example:
----------------------------------------------------------------
#include <vector>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/index/rtree.hpp>
void testSpacialIndexing()
{
namespace bg = boost::geometry;
namespace bgm = boost::geometry::model;
namespace bgi = boost::geometry::index;
typedef bgm::d2::point_xy<double> P;
typedef bgm::box<P> B;
P qpt;
B qbox;
bgm::ring<P> qring;
bgm::polygon<P> qpoly;
bgm::multi_polygon<bgm::polygon<P>> qmpoly;
bgm::segment<P> qseg;
bgm::linestring<P> qls;
// spacial indexing example
typedef std::pair<B, int> Value_t;
bgi::rtree<Value_t, bgi::quadratic<8>> rtree1;
std::vector<Value_t> found;
// 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));
// 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));
}
----------------------------------------------------------------
Test works with release 1.58
Test does not work with releases 1.59, 1.60, 1.61.0b1
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12189> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC