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


IGeometry Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometry Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Geometry)  

IGeometry Interface

Provides access to members that describe properties and behavior of all geometric objects. Note: the IGeometry interface has been superseded byIGeometry5. Please consider using the more recent version.

Product Availability

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

Description

Common properties and methods shared by all geometric objects.  Geometries are objects that define a spatial location and an associated geometric shape.

Members

Name Description
Read-only property Dimension The topological dimension of this geometry.
Read-only property Envelope Creates a copy of this geometry's envelope and returns it.
Read-only property GeometryType The type of this geometry.
Method GeoNormalize Shifts longitudes, if need be, into a continuous range of 360 degrees.
Method GeoNormalizeFromLongitude Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.
Read-only property IsEmpty Indicates whether this geometry contains any points.
Method Project Projects this geometry into a new spatial reference.
Method QueryEnvelope Copies this geometry's envelope properties into the specified envelope.
Method SetEmpty Removes all points from this geometry.
Method SnapToSpatialReference Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
Read/write property SpatialReference The spatial reference associated with this geometry.

CoClasses that implement IGeometry

CoClasses and Classes Description
BezierCurve A cubic Bezier curve defined between two points; optionally has measure, height and ID attributes at each endpoint.
CircularArc A portion of a circle that connects two points optionally has measure, height and ID attributes at each endpoint.
EllipticArc A portion of the boundary of a 2D ellipse that connects two points; optionally has measure, height and ID attributes at each endpoint.
Envelope A rectangle with sides parallel to a coordinate system defining the extent of another geometry; optionally has min and max measure, height and ID attributes.
GeometryBag An ordered collection of objects that support the IGeometry interface.
Line A 2D straight line between a pair of 2D endpoints; can optionally have height, measure and ID attributes at each endpoint.
MultiPatch A collection of surface patches.
Multipoint An ordered collection of points; optionally has measure, height and ID attributes.
Path A sequence of connected segments.
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.
Ray A 3D ray that begins at a point and extends infinitely along a line in one direction only.
Ring An area bounded by one, closed sequence of connected segments; optionally has measure, height and ID attributes at each vertex.
Sphere A complete sphere.
TriangleFan A continuous 3D fan of triangles, where each triangle after the first shares an edge with the preceding triangle, and all triangles share a common pivot point.
Triangles A collection of 3D triangles, where each consecutive triplet of vertices defines a new triangle
TriangleStrip A continuous 3D strip of triangles, where each triangle after the first shares an edge with the preceding triangle.

Remarks

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.

.NET Snippets

Draw Rectangle | Draw Polyline | Draw Polygon | Flash Geometry | Remove Segments From Geometry | Transform Point | Create Force Element | Add Graphic to Map | Perform Spatial Query | Create Animation from Path | Get Polyline From Mouse Clicks | Zoom to Selected Globe Features | Create Tactical Graphic

.NET Samples

Convert part to feature command (Code Files: ConvertPart) | 3D multipatch examples (Code Files: CompositeExamples DrawUtilities ElementUtilities ExtrusionExamples GeometryUtilities GraphicsLayer3DUtilities MultiPatchExamples RingExamples RingGroupExamples Transform3DExamples TriangleFanExamples TrianglesExamples TriangleStripExamples Vector3DExamples) | Cut polygons without selection edit task (Code Files: CutPolygonsWithoutSelectionEditTask) | Editing using a custom form (Code Files: EditorForm) | Custom reshape polyline edit task (Code Files: ReshapePolylineEditTask) | Implementing a schematic layout algorithm and its layout property page (Code Files: TranslateTree) | Custom map selection commands (Code Files: SelectFeatures) | Custom UI elements using add-ins (Code Files: AddGraphicsTool) | Create a custom raster type from the ground up for DMCII data (Code Files: DMCIIRasterType) | Implementing a schematic digitizing tool (Code Files: DigitTool) | Brushing to create a selection (Code Files: BrushingVB) | Custom vertex editing commands (Code Files: CustomVertexCommands) | Calculate area geoprocessing function tool (Code Files: CalculateAreaFunction) | Move a graphic along a path in ArcMap (Code Files: AnimationUtils cmdMoveGraphicAlongPath frmCreateGraphicTrackOptions MapGraphicKeyframe) | ArcGIS Network Analyst extension barrier location editor (Code Files: EditorForm) | Create custom move, rotate, and scale GeometricEffects within a single project (Code Files: clsGE_Transform_Move clsGE_Transform_Rotate clsGE_Transform_Scale) | Bind a geodatabase table to a .NET control (Code Files: FieldPropertyDescriptor) | Creating a toolbar of globe tools (Code Files: PointElement PointGeometry PolygonElement PolygonGeometry PolylineElement PolylineGeometry StyleElement TextElement) | Buffer snap agent (Code Files: BufferSnap) | Subset network evaluators (Code Files: AutoUpdateNetworkElementArrayParametersCommand SubsetHelperUI) | StreetMap routing (Code Files: RoutingForm) | RSS weather layer (Code Files: RSSWeatherLayerClass) | Create a custom tool (Code Files: DrawGraphicLine) | Create camera flyby from path (Code Files: frmCameraPath) | RubberBand zoom (Code Files: RubberBandZoom) | Create a custom marker placement for placing markers around a point (Code Files: AroundPoint) | Reducing schematic nodes and computing a cumulative attribute via a schematic rule (Code Files: NodeReductionRule)

.NET Related Topics

3DAnalyst | Calling the Simplify method | Cartographic representations | Casting between interfaces | Create a custom tool | Creating a plug-in data source | Developing SOAP server object extensions | Executing spatial queries | Geodatabase | Geometry | How to animate the camera along a path (line feature) in globe | How to create a multipart polyline | How to create a multipoint | How to create a multipoint object from the vertices of a polyline | How to create a polygon | How to create a replica in a connected environment | How to create a replica in a disconnected environment | How to create a union of several polygons | How to download images from an image service | How to draw a polygon on the screen | How to draw a polyline on the screen | How to draw a rectangle on the screen | How to find the combined extent of two geometries | How to interpolate spot heights and profile lines on a TIN | How to merge conflicting geometries during a reconcile | How to modify a specific segment of a polyline | How to modify a specific vertex of a polyline | How to perform surface analysis on a terrain dataset | How to query an image service | How to zoom to selected features in globe | Listening to the OnValidate event for a geodatabase topology | Location | Selection trackers | Simplifying a feature geometry | Transforming envelopes in the display | Using ArcObjects (COM-based) in .NET | Working with map surrounds | Working with the edit sketch