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


Working with geometry (ArcObjects .NET 10.5 SDK)

Working with geometry


Summary
This topic is a brief introduction to geometry objects to help you understand the individual classes and interfaces in the Geometry library.

About geometry objects

The vector representations of geometries are used by the geodatabase and graphic element systems to define the shapes of features and graphics. The Geometry library provides operations that are used by the editor and map symbology systems to define and symbolize features. You can access common and useful geometric operations, such as projection and buffering, from any execution environment over the Internet using the GeometryServer Web service, or over a local area network (LAN) using the Web Application Developer Framework (ADF) and the GeometryServer proxy object. Almost every system in ArcObjects uses geometries in some way.
The top level geometries supported by the Geometry library that have constraints on their shapes are Point, Multipoint, Polyline, Polygon, and MultiPatch. When all constraints are satisfied, the geometry is said to be simple. When a constraint is violated, or it is not known if the constraint is met, the geometry is said to be non-simple. The ITopologicalOperator, IPolygonN, and IPolylineN interfaces provide operations for testing and enforcing simplicity.
Top level geometries support the classical set-theoretic operations for generating new geometries including union, ConstructUnion , intersection, difference, and symmetric difference. These operations are exposed through the ITopologicalOperator interface and create new geometries as results. Top level geometries also support the IRelationalOperator interface, which can perform a variety of tests on a pair of geometries, such as disjoint, contains, and touches. Three-dimensional versions of these interfaces—such as IRelationalOperator3D—take into account Z attributes when performing operations on Z-aware geometries. Both ITopologicalOperator and IRelationalOperator use the spatial reference associated with the input geometries when determining the result.
Each vertex of a geometry, in addition to its X and Y coordinates, can have additional attributes, called vertex attributes, such as Z, M, and pointID. In addition to the previously mentioned top level geometries, Paths, Rings, Segments, TriangleStrips, TriangleFans, and Triangles serve as building blocks for polylines, polygons, and multipatches. Polylines contain paths, polygons contain rings, and multipatches contain triangle strips, triangle fans, triangles, or rings. Paths and rings are sequences of vertices connected by segments. A segment is a parametric function that defines the shape of the curve connecting its vertices. Segment types include CircularArc, Line, EllipticArc, and BezierCurve. Envelopes describe the spatial extent of other geometries, and GeometryBags provide operations on collections of geometries.