I ran into this problem quite by accident. I am using line simplification to remove vertices from line elements to speed up the display of SQL Server Spatial data. I found I have a number of lines where the first and last vertices are the same. Depending on the shape of the line, the results of the simplify routine are a three vertex line with the same first and last vertex. This line will pass the IsValid test whether I use simple or advanced validation, but this is not a valid line in SQL Server, meaning it fails STIsValid().
My initial solution was to return the original line from my simplification routine, but I encounter at least one line with 75 vertices that simplified to three. This is exactly the type of line I want to simplify. My current work around for this problem is to remove the last vertex so I have a two point line that doesn't double back on itself. This may lead to its own set of problems however, such as line/route tracing.
Is this a problem with line simplification, or an expected result that I have to handle?
Can you suggest a better work around?
Shouldn't your Feature.IsValid() routine catch this problem?
Charles