packing algorithm in rtree in boost with dynamic_quadratic

972 views Asked by At

I want to create rtree with dynamic_quadratic and give it a range at contractor that it will use packing algorithm. Here my code for doing it with regular quadratic.

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);

How I can do it with:
bgi::rtree< PointValue, bgi::dynamic_quadratic > rtree_points(points);?

Alredy look at this example:
packing algorithm in rtree in boost

1

There are 1 answers

1
Tal On BEST ANSWER

When I post the answer, I search a little bit in the internet, and doesn't find a good answer. Then I realize I need to give a second parameter about the dynamic size i want to create the tree. So that how I did It.

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