I’m looking for an ArcGIS tool or script that will delete all the collinear vertices in line features. I tried the Simplify Line tool and Generalize in the Advanced Toolbar. The tools sort of work, but they convert curves to segments by adding vertices. I want to keep the original curves intact.
I also tried several Generalize transformers in FME, but get similar results.
Any thoughts?
Here is a before and after example of what I'm trying to achieve. This was done by deleting the vertices manually.
Best Answer
I think that you will need to write a script that works along each line from its start node and takes three vertex coordinates at a time.
If the angle between the first and middle vertex is the same (within a tolerance you set) as between the middle and third vertex then when you re-write the line omit the middle vertex.
If you start writing such code and get stuck, then present it here and our users are often willing to help.