Skip to main content
Solved

Difficulties LineBuilder - Building a line in the correct order


Forum|alt.badge.img

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 

 

Best answer by takashi

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.

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

2 replies

takashi
Influencer
  • Best Answer
  • April 4, 2021

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.


Forum|alt.badge.img

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:)


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