In the next Boost Geometry queries, are the results always sorted by minimum distance first?

I did some simple Cartesian point tests:

rtree.qbegin(bgi::nearest(Point(4, 4), 2)) 

and they were sorted in Boost 1.61.

Now I need documentation or a source citation to confirm this.

If not, I just sort the query result after that.

+7
c ++ boost boost-geometry
source share
1 answer

[Note] In the case of iterative queries, k-NN is guaranteed to pass through the closest values ​​first.

For K Nearest Neighbors boost :: geometry guarantees first iteration over the closest values.

A source

+5
source share

All Articles