Solved

Grouping points before line build

  • 22 February 2023
  • 7 replies
  • 4 views

Please can someone help me to group points and assign a unique ID to each cluster? I have a large feature containing several groups of points taken from a line (see attachment) but I would like to rebuild the line and make sure they don't all join up together.

So far, I am using a vertex extractor to break the line into points. I have played around with neighbourhood finder and it's telling me the distances between points in proximity, but I need to group them to result in something like the attached image.

Thanks in advance

icon

Best answer by DanAtSafe 23 February 2023, 03:54

View original

7 replies

Badge +2

@frank_herbert​ do you have a small sample dataset that you can share with the group.

If the points originate form a line, then give the line a temporary id (Counter) then create the points, do your transformation and then use LineBuilder (Group By the Line ID) to rebuild the lines

@frank_herbert​ do you have a small sample dataset that you can share with the group.

If the points originate form a line, then give the line a temporary id (Counter) then create the points, do your transformation and then use LineBuilder (Group By the Line ID) to rebuild the lines

Hi Mark, thanks for your response.

In the image attached, there are three lines all originating from the same line. Therefore they all share the same globalID. Before any transformation, the lines were connected with straight lines that I wanted to remove. The straight lines were caused by GPS noise (this is GPS tracking). I want the finished track to show the actual steps taken without the long straight lines.

 

I have used the vertex extractor to convert the line into points. After this, I need to join them back up again based on proximity or sort order, but ensure the lines are built individually or per spatial group/cluster, otherwise, I end up back where I started. The issue I'm having is grouping each of the three lines (or points) so that they don't all connect up and form one single line again.

Badge +2

@frank_herbert​ You don't mention how you are removing the " straight lines" that connect the lines. Perhaps using Chopper (2 vertices) to make line segments, drop long lines then LineCombiner to reconnect the line segments.

@frank_herbert​ You don't mention how you are removing the " straight lines" that connect the lines. Perhaps using Chopper (2 vertices) to make line segments, drop long lines then LineCombiner to reconnect the line segments.

The straight lines are removed when the incoming line feature goes through the vertex extractor. The line is then represented by vertices. The resulting vertices are what I'd like to reconstruct into three separate lines, but not sure how to group them. I have attached a sample of the data in FFS format. I would like to convert the points to two separate lines. Apologies this is rather difficult to explain!! Appreciate the help!

The straight lines are removed when the incoming line feature goes through the vertex extractor. The line is then represented by vertices. The resulting vertices are what I'd like to reconstruct into three separate lines, but not sure how to group them. I have attached a sample of the data in FFS format. I would like to convert the points to two separate lines. Apologies this is rather difficult to explain!! Appreciate the help!

Sample data attached

Userlevel 1
Badge +11

The straight lines are removed when the incoming line feature goes through the vertex extractor. The line is then represented by vertices. The resulting vertices are what I'd like to reconstruct into three separate lines, but not sure how to group them. I have attached a sample of the data in FFS format. I would like to convert the points to two separate lines. Apologies this is rather difficult to explain!! Appreciate the help!

Hi @frank_herbert​ , as @Mark Stoakes​ suggested, here's a picture of a workspace which joins the points together, chops them into 2-point segments, measures the lengths, and uses the StatisticsCalculator and a Tester to remove the longest segments before rejoining the rest into two lines with a LineCombiner:image

The straight lines are removed when the incoming line feature goes through the vertex extractor. The line is then represented by vertices. The resulting vertices are what I'd like to reconstruct into three separate lines, but not sure how to group them. I have attached a sample of the data in FFS format. I would like to convert the points to two separate lines. Apologies this is rather difficult to explain!! Appreciate the help!

This is brilliant! I'm not sure how it works yet so I'm going to study the StatsCalculator and the Tester because it looks like that's where the magic happens. Thank you for your help guys, great work.

Reply