Skip to main content
Solved

Combining points to lines based on multiple attribute groupings

  • February 21, 2022
  • 1 reply
  • 15 views

I have a following problem: I want to group and build lines from points based on two different groupings. Firstly by category_id that indicates certain categories for the lines (number of categories varies from 1-7). Secondly by "line_number" that indicates consecutive measurements points (see first picture with four point lines). As a result (see second picture first line) or in another words I want lines where category change starts a new line within "line number"-group. Points have order_id so it is can build the lines in particular order. I've tried LineBuilder but can't figure out which aggregations/groupings I should do and in which order.

 

 

 

pointsresult

Best answer by nielsgerrits

From the documentation:

"Connects input point features in the order they enter, forming linear or polygonal features."

So, the LineBuilder builds lines from points in the order how the points enter the transformer. What you need to do is:

  • Use a Sorter to fix the group by and point order. Something like, category, line id, point number. Without sample data hard to say how exactly.
  • Configure the LineBuilder, set Group By the correct groups.
View original
Did this help you find an answer to your question?

1 reply

nielsgerrits
VIP
  • Best Answer
  • February 21, 2022

From the documentation:

"Connects input point features in the order they enter, forming linear or polygonal features."

So, the LineBuilder builds lines from points in the order how the points enter the transformer. What you need to do is:

  • Use a Sorter to fix the group by and point order. Something like, category, line id, point number. Without sample data hard to say how exactly.
  • Configure the LineBuilder, set Group By the correct groups.

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