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

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.
GeoEllipse (esriDefenseSolutions) Its a spheroidal ellipse.
GeometryBag An ordered collection of objects that support the IGeometry interface.
GeoPolygon (esriDefenseSolutions) Its a spheroidal polygon.
GeoPolyline (esriDefenseSolutions) This is a spheroidal polyline.
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

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

.NET Samples

3D multipatch examples (Code Files: CompositeExamples DrawUtilities ElementUtilities ExtrusionExamples GeometryUtilities GraphicsLayer3DUtilities MultiPatchExamples RingExamples RingGroupExamples Transform3DExamples TriangleFanExamples TrianglesExamples TriangleStripExamples Vector3DExamples) | Bind a geodatabase table to a .NET control (Code Files: FieldPropertyDescriptor) | Brushing to create a selection (Code Files: BrushingVB) | Buffer snap agent (Code Files: BufferSnap) | Calculate area geoprocessing function tool (Code Files: CalculateAreaFunction) | Convert part to feature command (Code Files: ConvertPart) | Create a custom marker placement for placing markers around a point (Code Files: AroundPoint) | Create a custom tool (Code Files: DrawGraphicLine) | Create camera flyby from path (Code Files: frmCameraPath) | Create custom move, rotate, and scale GeometricEffects within a single project (Code Files: clsGE_Transform_Move clsGE_Transform_Rotate clsGE_Transform_Scale) | Creating a toolbar of globe tools (Code Files: PointElement PointGeometry PolygonElement PolygonGeometry PolylineElement PolylineGeometry StyleElement TextElement) | Custom map selection commands (Code Files: SelectFeatures) | Custom reshape polyline edit task (Code Files: ReshapePolylineEditTask) | Custom UI elements using add-ins (Code Files: AddGraphicsTool) | Custom vertex editing commands (Code Files: CustomVertexCommands) | Cut polygons without selection edit task (Code Files: CutPolygonsWithoutSelectionEditTask) | Displaying MOLE symbology with the GlobeControl (Code Files: MainForm) | Editing using a custom form (Code Files: EditorForm) | Find near features REST SOE (Code Files: FindNearFeaturesRestSOE_VBNet) | Find near features SOAP SOE (Code Files: FindNearFeaturesSoapSOE_VBNet) | Implementing a schematic digitizing tool (Code Files: DigitTool) | Implementing a schematic layout algorithm and its layout property page (Code Files: TranslateTree) | Import signposts (Code Files: ImportDynamapSignsFunction ImportMultiNetSignsFunction ImportNavStreetsSignsFunction SignpostUtilities) | Move a graphic along a path in ArcMap (Code Files: AnimationUtils cmdMoveGraphicAlongPath frmCreateGraphicTrackOptions MapGraphicKeyframe) | Network Analyst barrier location editor (Code Files: EditorForm) | RSS weather layer (Code Files: RSSWeatherLayerClass) | RubberBand zoom (Code Files: RubberBandZoom) | Server spatial query COM utility (Code Files: VegUtils_VBNet) | Server spatial query server object extension (Code Files: Extension) | Simple point plug-in data source (Code Files: SimplePointCursor SimplePointDataset) | Simple SOE (Code Files: UtilSOE_VBNet) | StreetMap routing (Code Files: RoutingForm) | Subset network evaluators (Code Files: AutoUpdateNetworkElementArrayParametersCommand SubsetHelperUI) | Using MOLE symbol-based graphics with interactive maps (Code Files: MainForm) |

.NET Related Topics

3DAnalyst | Calling the Simplify method | Cartographic representations | Casting between interfaces | Create a custom tool | Creating a plug-in data source | DefenseSolutions | Executing spatial queries | Geodatabase | Geometry | How to animate the camera along a path (line feature) in globe | How to convert coordinate arrays | 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 develop the SOE | 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 | SOAP Web services | Transforming envelopes in the display | Using ArcObjects (COM-based) in .NET | Working with map surrounds | Working with the edit sketch |