SpatialReference sr = SpatialReferences.WGS84;
Coordinate2D[] coords = new Coordinate2D[] { new Coordinate2D(5, 10), new Coordinate2D(15, 20), new Coordinate2D(25, 10), new Coordinate2D(5, 20) };
Polyline polyline = PolylineBuilderEx.CreatePolyline(coords, sr);
// polyline.IsKnownSimpleOgc = false
// polyline.IsKnownSimple = false
NonSimpleReason nonSimpleReason;
bool isSimple = GeometryEngine.Instance.IsSimpleOgc(polyline, out nonSimpleReason, true);
// isSimple = false
// nonSimpleReason = NonSimpleReason.SelfIntersections
Polyline simplePolyline = GeometryEngine.Instance.SimplifyOgc(polyline) as Polyline;
// simplePolyline.IsKnownSimpleOgc = true
// simplePolyline.IsKnownSimple = true
double resolution = sr.XYResolution;
Coordinate3D[] coords3D = new Coordinate3D[] { new Coordinate3D(0, 0, 0), new Coordinate3D(0, 1.8 * resolution, 0.8 * sr.ZTolerance), new Coordinate3D(10, 10, 1),
new Coordinate3D(0, 5, 1) };
polyline = PolylineBuilderEx.CreatePolyline(coords3D, sr);
isSimple = GeometryEngine.Instance.IsSimpleOgc(polyline, out nonSimpleReason);
// isSimple = false
// nonSimpleReason = NonSimpleReason.ShortSegments
simplePolyline = GeometryEngine.Instance.SimplifyOgc(polyline, true) as Polyline;
// simplePolyline.IsKnownSimpleOgc = true
// simplePolyline.IsKnownSimple = true
coords = new Coordinate2D[] { new Coordinate2D(0, 0), new Coordinate2D(0, 0) };
Multipoint multipoint = MultipointBuilderEx.CreateMultipoint(coords, sr);
isSimple = GeometryEngine.Instance.IsSimpleOgc(multipoint, out nonSimpleReason);
// isSimple = false
// nonSimpleReason = NonSimpleReason.DuplicateVertex