Boost logo

Geometry :

Subject: Re: [geometry] Spatial Index, query on rectangle size
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2016-03-14 22:39:00


Chi Thanh Nguyen wrote:
> Hi,
> My first time I join the community, thanks all contributors for this
> library, part of boost.


> Hope that I can get some helps.
> I'm working on a data issue where I will have a lot of points (says a
> few millions), many of them overlaps. Can I use the rtree, push all my
> points(2D) inside, and get the group of rectangles where the size is
> small enough (I will define how is small enough in my query). Then I
> iterate from those small rectangles, get points from them, and to my
> analyze on those.
> So my question is : Is it possible to query the rtree by size of
> rectangle, instead of certain concrete geometry form?

AFAIU instead of querying for the values stored in leaf nodes of the
rtree you'd like to get the bounding boxes of nodes if they are small
enough. Is that correct?
If this is what you'd like to do then unfortunately this is not supported.
However if you don't mind using non-publicly released parts of the
implementation which could change in the future you could write your own
tree visitor.
This is e.g. how a visitor printing the contents of the rtree looks like:

And this is how it's used:


Geometry list run by mateusz at