Spatial Index, query on rectangle size

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Spatial Index, query on rectangle size

Chi Thanh Nguyen
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?

Thank you very much.

Kind regards, 

Chi Thanh NGUYEN



_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|

Re: Spatial Index, query on rectangle size

Adam Wulkiewicz
Hi,

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

Welcome!

> 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:

https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L133

And this is how it's used:

https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L200

Regards,
Adam
_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Reply | Threaded
Open this post in threaded view
|

Re: Spatial Index, query on rectangle size

Chi Thanh Nguyen
Hi Adam,

Yes, I exactly want to find the small bounding box and so all points inside this small box, amplify their variance to get better visualization.
I don't have time now to test the idea, but it's great to be able to override the visitor. 

Thank you very much for the help.

Kind regards,
Chi Thanh,


Kind regards, 

Chi Thanh NGUYEN
+44 77 43 86 96 42
[hidden email]
http://nguyenchithanh.free.fr



On 15 March 2016 at 02:39, Adam Wulkiewicz <[hidden email]> wrote:
Hi,

Chi Thanh Nguyen wrote:
Hi,

My first time I join the community, thanks all contributors for this library, part of boost.


Welcome!

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:

https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L133

And this is how it's used:

https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/utilities/print.hpp#L200

Regards,
Adam
_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry


_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry