
Geometry : 
Subject: Re: [geometry] RTree Nearest Neighbors Unique Member From Group
From: jpb (jberg_at_[hidden])
Date: 20180516 18:33:39
Hi Adam,
Thanks for taking the time to think about this and replying with your
thoughts. I appreciate it.
So for this application each of the Ngroups are all pretty localized and N
is a large number, so I think I could keep each group in a grouprtree and
then keep each grouprtree in an overarchingrtree (with things like
indexable and compariable_distance for a grouprtree and a point overloaded
to give the distance between the closest object in the rtree to the point).
If I did that, I could run a nearest neighbor search on the
overarchingrtree and get the k closest grouprtree's, but then in order
to get the objects in each grouprtree, I'd have to run another nearest
neighbor search on the grouprtree. Is there a good way around that
repeated computation?
If that doesn't work, I might just put all of the objects in a single rtree
and get all or the objects withing a certain range (using something like the
intersects query) and then process those items to get what I want, and then
just live with the fact that fewer than k groups might intersect a range, so
it would be a find the nearest korless neighbors with at most one in each
group query.
Thanks again.
 Sent from: http://boostgeometry.203548.n3.nabble.com/
Geometry list run by mateusz at loskot.net