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!

icon

Best answer by aron 23 March 2023, 10:00

View original

5 replies

Badge +14

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.

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.

Badge +14

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.

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?

Badge +14

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.

Reply