Skip to main content
Solved

Indexing chopped line segments


alfons
Contributor
Forum|alt.badge.img+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

Best answer by DanAtSafe

alfons wrote:

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.

View original
Did this help you find an answer to your question?

4 replies

DanAtSafe
Safer
Forum|alt.badge.img+17
  • Safer
  • November 1, 2022

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


alfons
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • November 1, 2022

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

 


DanAtSafe
Safer
Forum|alt.badge.img+17
  • Safer
  • Best Answer
  • November 1, 2022
alfons wrote:

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.


alfons
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • November 2, 2022
DanAtSafe wrote:

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


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