It is what the Project Cleanup does. But as discussed earlier, the Project Cleanup does it only on the vertices defined in the Horizontal Tab of the Linestring Definition. As long as Linestring has only "horizontal" definition it's all good.
What if some one applied "vertical" definition to the linestring that could use removal of the horizontal vertices?
Since vertical definition for the linestring is "chainage" based, just like the definition of the vertical alignment, I can't really see how we could filter the horizontal vertices without affecting vertical definition.
I'd propose changes as follows:
Removal of all "excess" vertices:
1) Program should "temporarily" convert all vertical vertices to horizontal vertices (so from "CH and ELEV" to "XYZ").
2) Any vertice "n" should be removed only if it is co-linear (in 3D) with vertices "n-1" and "n+1" (I can already see a problem with 3 vertices located on the same spot )
3) After that we could "safely" revert to the independent Horizontal and Vertical definitions.
Filtering of "superfluous" vertices:
1) Program should "permanently" convert all vertical vertices to horizontal vertices (so from "CH and ELEV" to "XYZ").
2) Line vertices should be filtered based on the defined "filtering radius".
Obviously in that scenario it is impossible to revert back into two independent definitions of the Linstring.
I have also notices some dramas with Editing Linestrings with applied Vertical Definitions.
Option "Insert Before Current Segment" while using "Edit Linestring" works fine when working on the segments non-including vertical overwrites.
Macro "Insert Line Segments" creates Frankenstein linestrings when applied to a line with Vertical Definitions, regardless of the location of the inserted vertice.