Finding nearest neighbour in a list of coordinates

What's the best way to get a list of nearest neighbours for each point in a list of point coordinates? I tried calculating the euclidean distance matrix, but am unsure how to then best get the nearest neighbor for each of the points with this matrix as a starting point...

Thx,

Jan

 

Hi Jan,

You can try the "Similarity Search" node.

Hope this helps,

Christian

1 Like

You can try the "Similarity Search" node.

Thanks Christian. I tried that yesterday and thought it'd always give me the identical spots as nearest neighbors when comparing a point set with itself.

Until I found that you can actually list the two nearest neighbors and then filter for neighbor index==1

So now it works :-) Thanks for the help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.