I need to use ITopologicalOperator.IsSimple() on Polylines geometry to determine if it doesn’t have any self intersection. However, i don’t understand the behaviour of this function, more specifically i don’t understand the behaviour of the flag isKnownSimple used by the function isSimple.
Why is this flag setted to true when a geometry comes from a feature class (http://resources.esri.com/help/9.3/ArcGISServer/apis/ArcObjects/esriGeometry/ITopologicalOperator_Is...) ?
As an exemple, i create a Polyline with non simple geometry, i test it with isSimple, the result is false. I save the Polyline on my database, i retreive it and i use isSimple again and the result magically changed to true. I assume this is explained by the IsKnownSimple is at true when an object comes from the database, but why…
I see two possibilities :
1) The geometry is modified to a simple geometry when we save it in the database.
2) The geometry from the database is supposed to be simple
The first possibility would be a problem as my geometry is modified.
The second possibility is also a problem as i can’t test any of the geometry currently in my database as the isSimple function will always return true.
So i got some questions :
Is there something i didn’t understood on the behaviour of the isSimple function ?
Is there any mean to test the correctness of the geometry (including those coming from the database) using ESRI’s framework ?
By the way, i can’t use simplify() as i can’t change my geometry.