Question

Remove all line vertices that don't change line shape

  • 18 April 2024
  • 2 replies
  • 61 views

Badge +4

Hello,

I’ve researched this a bit now, and most folks point to the Generalizer, maybe Thin No Point.  However, I’m not concerned about distance away from other vertices (parameters of Thin No Point), rather I’m only concerned with removing vertices that fall in a straight line under the original line.  In other words, remove vertices that don’t change the shape.  These vertices could be 1 foot away from an adjacent vertex or 1000’ feet, doesn’t matter. 

I’m more or less looking for a algorithm that checks whether each vertex is on-line between it’s neighbor to the left and neighbor to the right.  If it is on-line, then remove, if not, keep.  I realize that there would need to be some tolerance parameter (angle or distance offline) due to rounding, but can accept that fact.
 

Any ideas what transformer or Generalizer parameters to choose to best achieve this?

Thank you,

Tyler


2 replies

Userlevel 5
Badge +25

I usually use the Generalizer with Douglas with a very low tolerance for these situations.

Userlevel 4
Badge +26

I usually use the Generalizer with Douglas with a very low tolerance for these situations.

Can confirm this, e.g., 0.01 m

Reply