Skip to main content
Question

Join point to its neighbours multiple permutations

  • February 28, 2020
  • 4 replies
  • 25 views

umapper1
Contributor
Forum|alt.badge.img+5

Hi community! I'm unsure how to tackle this so looking for any suggestions...

What I have is a data set of hundreds of points. These are arranged in 'groups' by sharing a common attribute. I'd like to join point to point (create lines) in every permutation of each group. See example images of groups below.

My ultimate objective here is only to find the longest distance (and generate a line) between the points per group. Bear in mind that there are multiple groups so I need to run the operation by group or have another means of performing the analysis per group. This is a 2D exercise however the points have a Z value that I would like to retain. Thoughts?

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.

4 replies

takashi
Celebrity
  • 7843 replies
  • February 28, 2020

How can you determine to which group a point belongs? Do the points have a common attribute storing group ID, for example?


umapper1
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • 41 replies
  • February 28, 2020

How can you determine to which group a point belongs? Do the points have a common attribute storing group ID, for example?

Correct @takashi. Just an attribute with a value like "PH123"for example.


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • 562 replies
  • February 28, 2020

Use NeighborFinder in Candidates Only Mode with Group By set to the Group Attribute.

This will output in a List all permutations of Candidate to Candidate distances within the Group, as well as conveniently the To and From X,Y coordinates.

ListExploder + Sorter (GroupID Ascending, _Distance Numeric Descending) + DuplicateFilter (Set to GroupID) will return the first calculated distance per Group, which thanks the the Sorter will be the longest distance in the group.

Constructing the line from the X,Ys is then just VertexCreator (Replace with Point) to create an initial Point Geometry + a second VertexCreator (Add Point) to alter this to a 2 point line.


umapper1
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • 41 replies
  • March 2, 2020

Use NeighborFinder in Candidates Only Mode with Group By set to the Group Attribute.

This will output in a List all permutations of Candidate to Candidate distances within the Group, as well as conveniently the To and From X,Y coordinates.

ListExploder + Sorter (GroupID Ascending, _Distance Numeric Descending) + DuplicateFilter (Set to GroupID) will return the first calculated distance per Group, which thanks the the Sorter will be the longest distance in the group.

Constructing the line from the X,Ys is then just VertexCreator (Replace with Point) to create an initial Point Geometry + a second VertexCreator (Add Point) to alter this to a 2 point line.

Thanks @bwn. This was right under my nose! It really pays to have a fresh set of eyes on a problem. Many thanks!