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: http://github.com/boostorg Boost.Geometry: http://github.com/boostorg/geometry Boost.Geometry develop branch: http://github.com/boostorg/geometry/tree/develop As for the kNN query, see the reference #2 in the docs: http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/spatial... 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: http://github.com/boostorg/geometry/blob/develop/include/boost/geometry/inde... Regards, Adam