Opened 6 years ago
Closed 6 years ago
#12189 closed Bugs (fixed)
R-tree spacial predicates for ring, polygon, multipolygon fail to compile
Reported by: | Owned by: | Barend Gehrels | |
---|---|---|---|
Milestone: | Boost 1.62.0 | Component: | geometry |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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
Attachments (1)
Change History (2)
by , 6 years ago
Attachment: | boost_issue_12189.cpp added |
---|
comment:1 by , 6 years ago
Milestone: | To Be Determined → Boost 1.62.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
example as cpp file