Boost logo

Geometry :

Subject: Re: [geometry] Group Nearest Neighbour queries using nearest() predicate
From: oliveoil_s (nusratst.cse_at_[hidden])
Date: 2014-03-29 00:10:08

Thank you so much for your reply . Actually the research in the following
paper might answer some of your questions

>// assuming you multipoint supports initializer lists
>bgi::nearest(my_multi_point{point(0,0),point(100,30),point(200,60)}, 5)
>Still this call will return 5 Values closest to any of those points.

In case of group knn the nearest neighbour query will return those
neighbours which have the smallest group distance from the set of query
points .
Let's consider we have 3 query points q1,q2,q3 for which we are searching
the group NN, for a point p to be the group nearest neighbour of these 3
points the distance=(dist(p,q1)+dist(p,q2)+dist(p,q3)) should be the minimum
that any other point .

>> There are other functions like sum,max,min,range query for group of
>> points.
>> Are those already supported in boost ?

>I assume that:
>- sum returns Values for which the sum of distances with all points is
>the smallest one?
>- min works like the default query
>- should max return the furthest Value for any of those points?

 you are right .

>- should range return the closest values but this distance should be in
>some range?

Actual Range query returns all the points that are within a range (distance)
from a given point .
Let we want to do a range query for point (0,0) with range 10 in the r-tree
we will search in the r-tree for all the points that has distance<=10 with
point(0,0) .

Actually as you said , generalization is major issue here . These query
should also support Box's and that will be a great challenge .

>And probably (for ranges, rays, paths)
>4. If the Value (checked using Indexable or Value?) should be analysed
>5. If the Node (checked using Box) should be analysed

I don't get this part , What do you mean by Indexable/Value/Box ?

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

Geometry list run by mateusz at