Skip to main content
Solved

Neighborfinder multiple candidates and calculate average distance


pabloolivaresm
Supporter
Forum|alt.badge.img+4

Hi,

I need to find the average distance of 25 nearest neighbours in a point layer. I have tried with Neighborfinder set to 25 number of neighbours to find and generate a list, then a ListExploder to expose the list, but I don't know how to group the 25 neighbours to calculate the average distance of these 25 neighbours to the base point

 

Im gettin this of ListExploder: idRecord it’s the ID of points.

Any ideas for grouping the 25 neighbours to calculate the average distance?

Thanks you all.

Best answer by geomancer

Instead of exploding the list, use a ListSummer to summarize the distances, and divide the sum by the number of candidates (use a ListElementCounter to verify the number of candidates, or simply use 25).

 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • Best Answer
  • March 13, 2025

Instead of exploding the list, use a ListSummer to summarize the distances, and divide the sum by the number of candidates (use a ListElementCounter to verify the number of candidates, or simply use 25).

 


pabloolivaresm
Supporter
Forum|alt.badge.img+4
geomancer wrote:

Instead of exploding the list, use a ListSummer to summarize the distances, and divide the sum by the number of candidates (use a ListElementCounter to verify the number of candidates, or simply use 25).

 

 

Thanks ​@geomancer, it’s works!


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • March 17, 2025

You're welcome, thanks for the feedback and the 'Best Answer’!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings