Boost logo

Boost Users :

Subject: Re: [Boost-users] nearest neighbors search with boost
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-04-11 06:35:27

Hi Georgios,

Georgios Samaras wrote:
> I just find out that boost supports nearest neighbor searching, will
> amazes me. However, I do not want just to use the nearest() method, I
> want to study it and understand it. Is there any relevant
> documentation, specifically on how NNS is performed in R-tree? Are the
> code files that implement this method visible to the user? I
> downloaded the latest .tar file.

Of course, Boost is oprn-source. Boost We're now at GitHub.

Here is the main module:
Boost.Geometry develop branch:

As for the kNN query, see the reference #2 in the docs:

There is no documentation of the internals. In all cases we use the
visitor design pattern to traverse the rtree (the interface similar to
the Boost.Variant's static_visitor<>). If the nearest() predicate is
passed to the query() function, the distance_query<> visitor is used. It
can be found here:


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at