Skip to main content
Solved

Hello everyone, I am trying to reduce the number of vertices without changing the original shape of the line graph. The graph has multiple twisted lines. I need to open the twisted line or cut the twisted part.


I tried generalizer and spike removal. The spike removal works to remove the twisted lines, but it leaves small cuts everywhere. Any advice how to clean the small cut lines and reduce the number of vertices? Thank you so much!

Best answer by aron

I would run an Intersector and then a ClosedCurveFilter to check weather the line is open or not. A Tester will sort out the closed features. Finally I would consider a LineBuilder and some generalisation to clean things up.

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

5 replies

aron
Supporter
Forum|alt.badge.img+16
  • Supporter
  • Best Answer
  • March 23, 2023

I would run an Intersector and then a ClosedCurveFilter to check weather the line is open or not. A Tester will sort out the closed features. Finally I would consider a LineBuilder and some generalisation to clean things up.


  • Author
  • March 23, 2023

Thank you, Aron,

Just to test, I started with 5 attributes but end up with only one attribute. Also, the line did not open. I need to keep all tributes for my final result.


aron
Supporter
Forum|alt.badge.img+16
  • Supporter
  • March 23, 2023

None of the transformers I suggested would change the original attributes. Try adding Inspectors to see where it goes wrong. Or share your workspace here.


  • Author
  • March 23, 2023

Thank you so much Aron, Your suggestion works perfectly! The error I was getting it was from my end. How can I stop from creating another loop after passing the LineBuilder? Any advice?


aron
Supporter
Forum|alt.badge.img+16
  • Supporter
  • March 24, 2023
addmy wrote:

Thank you so much Aron, Your suggestion works perfectly! The error I was getting it was from my end. How can I stop from creating another loop after passing the LineBuilder? Any advice?

The loops should be gone by then. If you have downstream processes that introduces new "loops" you just repeat the same procedure. If there are lines that have small gaps they won't register in the ClosedCurveFilter and you can try closing the gaps with the Snapper transformer.


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