Skip to main content
Solved

Difficulties LineBuilder - Building a line in the correct order

  • April 4, 2021
  • 2 replies
  • 209 views

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.

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.

2 replies

takashi
Celebrity
  • 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:)