Boost logo

Geometry :

Subject: AW: [ggl] Re: rtree ?
From: Bernhard (Bernhard.Schmitz)
Date: 2011-12-02 13:20:49

Thanks for the quick fix.

Adam Wulkiewicz wrote
> Btw, maby it would be better to use std::pair<Box, Segment> and
> default
> Translator. Or even store segments in some vector and use
> std::pair<Box,
> size_t>. The r-tree wouldn't be forced to calculate envelopes each time
> it want something from the Value.
That's what I was doing in my previous version when I was using the very
rudimentary rtree that is in the non-sandbox boost geometry svn directory.
And as I already mentioned, I need to iterate over all my objects anyway, so
I can easily switch back. However when I found the new rtree version, I
thought it would be more elegant to use the translator. I thought that the
envelope would be calculated once during insertion and then in the
background the envelope would be stored.

If I understand that correctly, wouldn't that mean that this whole
translator thing is useless, unless we have objects that store their
envelope anyway and can provide a reference to it? That doesn't seem very
reasonable to me. To me, the beauty of it seemed to be that given the right
translator, I could just stuff all kinds of objects into the rtree and
retrieve them with a query with no additional code on the outside. But if
that is lost I don't really get the advantage of the current design.


View this message in context:
Sent from the Boost Geometry mailing list archive at

Geometry list run by mateusz at