Solved

Indexing chopped line segments

  • 1 November 2022
  • 4 replies
  • 3 views

Badge +7

Hello, 

 

for calculations on line segments I divide a line into its individual segments between two vertices (2-point line) using the transformer "Chopper". For a further processing step I need the number of the segment within the total line. This means that if my line consists of 11 vertices, I have 10 line segments. The first line segment should start with the element ID 0. I have tried to do this with a counter, but without success. For this reason, I would like to ask how I can solve this elegantly. Thanks a lot

icon

Best answer by DanAtSafe 1 November 2022, 19:11

View original

4 replies

Userlevel 1
Badge +11

@alfons​ What problem are you getting with the Counter?

Badge +7

it counts all line segments of all lines and dont start a new counting by a new line

 

Userlevel 1
Badge +11

it counts all line segments of all lines and dont start a new counting by a new line

 

You'll need to set the Count Scope to Local and check Group Processing; then Group By the unique line attribute value.

Badge +7

You'll need to set the Count Scope to Local and check Group Processing; then Group By the unique line attribute value.

to switch the count scope to "local" was the the advice. Thanks a lot, now it runs perfectly

Reply