can get the point index ?
zuixiaosanlang opened this issue · 3 comments
zuixiaosanlang commented
can get the point index ?
cdalitz commented
Can you please elaborate what you are trying to achieve?
If you are not interested in the point coordinates, but into some label assigned to each node (e.g. an index), you can use the property data
of KdNode
. Note that k_nearest_neighbors
does not return points, but a KdNodeVector
, so you can access the data
attribute of the nodes.
zuixiaosanlang commented
@cdalitz
thank you. i get it
cdalitz commented
As I needed this myself, I have added an additional public attribute index to KdNode
in the new release version 1.2.