If I have a polyline, how do I figure out whether it is self-intersecting? I tried to use ITopologicalOperator.IsSimple Property, but it always returns true.
Are there any ways of doing these kind of topological checks over individual geometries?
Answer
I think you can do with with the ITopologicalOperator2 interface:
dim pTopoLogicalOp as ITopologicalOperator2
Set pPolyline = pFeature.ShapeCopy
Set pTopoLogicalOp = pPolyline
Let pTopoLogicalOp.IsKnownSimple = False
If pTopoLogicalOp.IsSimple = False Then
' Polyline is self intersecting
End If
No comments:
Post a Comment