Question

Join point to its neighbours multiple permutations

  • 28 February 2020
  • 4 replies
  • 2 views

Badge +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?


4 replies

Userlevel 2
Badge +17

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

Badge +5

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.

Badge +3

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.

Badge +5

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!

Reply