Skip to main content
Solved

Combining points to lines based on multiple attribute groupings

  • February 21, 2022
  • 1 reply
  • 37 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.
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.

1 reply

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • 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.