Solved

Difficulties LineBuilder - Building a line in the correct order

  • 4 April 2021
  • 2 replies
  • 29 views

Badge

Hi everyone and happy easter!

 

I am facing some difficulties with the LineBuilder Transformer, maybe someone has an idea how to solve this issue.

 

I am generalizing lines, to calculate the lenght between linepoints per line feature.

 

Our surveying data (especially lines) are generated based on linepoints. Anway, inbetween those linepoints lines (splines, arcs) often have vertexpoints, to display their curvature.

 

I managed to give all linepoints the ID of the corresponding line feature (often linepoints carry geometry for more than 1 line, because they are intersection points).

 

Now i need to build the simplifies lines for each line feature, but only using the linepoints as vertexpoints. In some cases it turns out well, but in other one I am achieving an interesting result (see attached pictures). Do you have any idea why my lines are in some cases built like this? Or how to avoid such results?

Picture 1: Original line feature

2Picture 2: Linepoints of this line feature

 

1Picture 3: Result of the LineBuilder

 

3 

 

icon

Best answer by takashi 4 April 2021, 14:08

View original

2 replies

Userlevel 2
Badge +17

Hi @sara_lenakordas​ ,

the LineBuilder connects points in their input order to form a line.

If the vertex points shown in the picture 2 have attribute representing desired connecting order, you can sort them by the attribute with a Sorter transformer before connecting them with the LineBuilder.

Badge

Hi @Takashi Iijima​ ! i used the sorter to sort by Line_ID, i didn't include the order of the vertexpoints per line. I added the counter before, using counter_@Value(xxx_ID) and now it works!! Amazing, thanks for your help:)

Reply