ArcObjects Library Reference (Geometry)  

ITopologicalOperator.IsSimple Property

Indicates whether this geometry is known (or assumed) to be topologically correct, after explicitly determining this if the geometry is not already known (or assumed) to be simple.

[Visual Basic .NET]
Public ReadOnly Property IsSimple As Boolean
[C#]
public bool IsSimple {get;}
[C++]
HRESULT get_IsSimple(
  VARIANT_BOOL* IsSimple
);
[C++]

Parameters

IsSimple [out, retval]   IsSimple is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Returns TRUE if the geometry is topologically Simple (refer to the discussion for the Simplify method).  If the geometry is not Simple, it may be necessary to call Simplify to enforce topological consistency.  Editing a geometry can change the IsSimple state of the geometry.

Remarks

ITopologicalOperator methods must be applied on high-level geometries only. High-Level geometries are point, multipoint, polyline and polygon. To use this method with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), paths or rings, they must be wrapped into high-level geometries types.

The xy cluster tolerance value of the geometry's associated spatial reference is used by this method. If the goal of this method is to determine if a geometry can be persisted in an sde (or other integer-based) layer without alteration, you may wish to use the minimum xy cluster tolerance value (ISpatialReferenceTolerance::SetMinimumXYTolerance) before applying this method (don't forget to set it back).

This method does not support GeometryBags.

ITopologicalOperator IsSimple SimplePolygon Example

ITopologicalOperator IsSimple SimplePolyline Example

ITopologicalOperator IsSimple SimplePoint Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

See Also

ITopologicalOperator Interface

.NET Related Topics

Creating custom symbols |