ReeSSult
ReeSSult

Reputation: 496

boost r-tree packing algorithm during insertion

The question is about the boost::geometry::index::rtree:

I know that the constructor: rtree(Iterator, Iterator) will create the tree using the packing algorithm, as stated in the documentation. I'm wondering whether the insertion which accepts the iterators: insert(Iterator, Iterator) will also use the packing algorithm.

Thanks.

Upvotes: 0

Views: 566

Answers (2)

jwezorek
jwezorek

Reputation: 9535

The packing algorithm is used if the R-tree is created from items given to the constructor. The balancing algorithm is used during splitting of nodes i.e. on insert() and remove().

So the answer is no. During insertion the packing algorithm is ignored.

Upvotes: 2

ReeSSult
ReeSSult

Reputation: 496

Ok, I'm assuming that the packing algorithm is only used during the creation.

Comment by Adam Wulkiewicz, one of the boost::geometry developers:

"There is only one packing algorithm implemented at the moment. So if you create the R-tree using packing algorithm always the same structure is created no matter which balancing algorithm was picked. But when you add or remove a value to/from this R-tree then choosen balancing algorithm is used"

Source: Serialize/de-serialize Boost.Geometry rtree

Upvotes: 2

Related Questions