dynamic_quadratic 中 rtree 中的打包算法

packing algorithm in rtree in boost with dynamic_quadratic

我想用 dynamic_quadratic 创建 rtree 并在承包商处给它一个范围,它将使用打包算法。 这是我用正则二次函数做的代码。

namespace bg = boost::geometry;
namespace bgi = boost::geometry::index;

typedef bg::model::point<double , 3, bg::cs::cartesian> BoostPoint;
typedef std::pair<BoostPoint, unsigned> PointValue;

std::vector<PointValue> points;
for(...)
{
//fill in the points vector
}

bgi::rtree< PointValue, bgi::quadratic<16> > rtree_points(points);

我如何使用:
bgi::rtree< PointValue, bgi::dynamic_quadratic > rtree_points(points);?

已经看过这个例子了:

当我post回答的时候,我在网上搜索了一下, 并没有找到一个好的答案。然后我意识到我需要给出第二个关于我想要创建树的动态大小的参数。所以我是怎么做到的。

bgi::rtree<PointValue, bgi::dynamic_quadratic> rtree_points(points, points.size());