This document is archived and information here might be outdated.  Recommended version.


ITopologicalOperator Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IT > ITopologicalOperator Interface
ArcGIS Developer Help

ITopologicalOperator Interface

Provides access to members for constructing new geometries based upon topological relationships between existing geometries. Note: the ITopologicalOperator interface has been superseded by ITopologicalOperator5. Please consider using the more recent version.

Product Availability

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

Members

Name Description
Read-only property Boundary The boundary of this geometry. A polygon's boundary is a polyline. A polyline's boundary is a multipoint. A point or multipoint's boundary is an empty point or multipoint.
Method Buffer Constructs a polygon that is the locus of points at a distance less than or equal to a specified distance from this geometry.
Method Clip Constructs the intersection of this geometry and the specified envelope.
Method ClipDense Constructs the intersection of this geometry and the specified envelope; densifies lines in output contributed by the clipping envelope.
Method ConstructUnion Defines this geometry to be the union of the inputs. More efficient for unioning multiple geometries than calling Union repeatedly.
Method ConvexHull Constructs the convex hull of this geometry.
Method Cut Splits this geometry into a part left of the cutting polyline, and a part right of it.
Method Difference Constructs the geometry containing points from this geometry but not the other geometry.
Method Intersect Constructs the geometry that is the set-theoretic intersection of the input geometries. Use different resultDimension values to generate results of different dimensions.
Read-only property IsKnownSimple Indicates whether this geometry is known (or assumed) to be topologically correct.
Read-only property IsSimple 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.
Method QueryClipped Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope.
Method QueryClippedDense Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope; densifies lines in the output contributed by the clipping envelope.
Method Simplify Makes this geometry topologically correct.
Method SymmetricDifference Constructs the geometry that contains points from either but not both input geometries.
Read-only property TopologyCache Provides a handle to the TopologyCache.
Method Union Constructs the geometry that is the set-theoretic union of the input geometries.

Classes that implement ITopologicalOperator

Classes Description
GeometryBag An ordered collection of objects that support the IGeometry interface.
MultiPatch A collection of surface patches.
Multipoint An ordered collection of points; optionally has measure, height and ID attributes.
Point A two dimensional point, optionally with measure, height, and ID attributes.
Polygon A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes.
Polyline An ordered collection of paths; optionally has measure, height and ID attributes.

Remarks

Buffer, Clip, and Simplify are the only methods of ITopologicalOperator supported on GeometryBags.

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

For multipatch geometries, generally the footprint or envelope is used.

Every Geometry created within ArcGIS should be assigned a spatial reference. Always attach well-defined spatial references to new geometries. This improves processing efficiency, in particular, when using ITopologicalOperator on geometries that contain curved segments (circular arcs, bezier curves, elliptical arcs). New geometries include any geometry that is created in memory. It does not matter whether it will be stored in a feature class or not. Well-defined as applied to a spatial reference means that it not only has its coordinate system (projection) defined, but also its coordinate grid. The coordinate grid consists of the xy domain, xy resolution, and xy cluster tolerance properties of a spatial reference. If the Geometry includes z or m values, the z or m domains, z or m resolutions, and z or m cluster tolerance properties must also be defined. The cluster tolerance and resolutions can be quickly and easily set using SetDefault methods on ISpatialReferenceResolution and ISpatialReferenceTolerance interfaces.

[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 ITopologicalOperator3 methods

See Also

IGeometry Interface | IRelationalOperator Interface

.NET Samples

Buffer snap agent Geoevents in a MapControl 3D multipatch examples 3D multipatch examples ViperPin tool