Skip to main content
Solved

Neighborfinder multiple candidates and calculate average distance

  • March 13, 2025
  • 3 replies
  • 65 views

pabloolivaresm
Supporter
Forum|alt.badge.img+5

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).

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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+59
  • 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+5

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+59
  • Evangelist
  • March 17, 2025

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