Boost logo

Geometry :

From: Zhe Li (17902731r_at_[hidden])
Date: 2019-10-13 08:18:10


Hi,

I'm trying to use an aggregate-Rtree
(https://link.springer.com/content/pdf/10.1007%2F3-540-47724-1_23.pdf) to
quickly find out the number of records given a predicate.

Currently, I use the following code, but it will traverse every node it has,
which is not the aggregate-Rtree manner (and quite inefficient).

============
size_t cardinality = 0; // number of matches in set
auto count_only =
boost::make_function_output_iterator([&cardinality](bgi::rtree<MyPoint,
  bgi::linear&lt;16>>::value_type const&) { ++cardinality; });
Box query_region(MyPoint(-91, -181), MyPoint(91, 181));
rtree.query(bgi::intersects(query_region), count_only);
============

I'm wondering is there any method to fast adapt the boost Rtree to an
aggregate-Rtree? Or can
boost Rtree directly provide such functionality (I cannot find it through
the document)?

Thanks,
Zhe

--
Sent from: http://boost-geometry.203548.n3.nabble.com/

Geometry list run by mateusz at loskot.net