Using DbGeometry and Entity Framework to work with Sql Geometry types. User can draw a line that can run outside of a given polygon. my validation traps that. I correct this by clipping the line to be the intersection of both geometries.
And that is working. however, the result of that intersection still trips up my validation (i assume by one coincident point).
I either need to shorten that line by a tiny amount or redesign my validation rule(which uses Shape.Within() to determine if the line is outside the polygon). I have solved this issue with polygons in the past by buffering them -0.00001 but that doesn't appear to be an option for lines