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


IGeometry.SpatialReference Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IGeometry.SpatialReference Property

The spatial reference associated with this geometry.

[Visual Basic .NET]
Public Property SpatialReference As ISpatialReference
[C#]
public ISpatialReference SpatialReference {get; set;}
[C++]
HRESULT get_SpatialReference(
  ISpatialReference** spatialRef
);
[C++]
HRESULT putref_SpatialReference(
  ISpatialReference* spatialRef
);
[C++]

Parameters spatialRef [out, retval]
spatialRef is a parameter of type ISpatialReference spatialRef
spatialRef is a parameter of type ISpatialReference

Product Availability

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

Description

Returns and sets the Spatial Reference in which the geometry exists. If the spatial reference has not been set the property will return an empty ISpatialReference instance.

See Also

IGeometry Interface

.NET Snippets

Transform Point

.NET Samples

Create a custom raster type from the ground up for DMCII data (Code Files: DMCIIRasterType) | RSS weather GraphicTracker (Code Files: RSSWeather) | Geoevents in a MapControl (Code Files: GeoEvents) | Move a graphic along a path in ArcMap (Code Files: AnimationUtils) | Create custom move, rotate, and scale GeometricEffects within a single project (Code Files: clsGE_Transform_Rotate clsGE_Transform_Scale) | Creating a toolbar of globe tools (Code Files: PolygonGeometry PolylineGeometry) | StreetMap routing (Code Files: RoutingForm) | RSS weather layer (Code Files: AddRSSWeatherLayer RSSWeatherLayerClass) | Triangle graphic element (Code Files: TriangleElementClass) | Reducing schematic nodes and computing a cumulative attribute via a schematic rule (Code Files: NodeReductionRule)

.NET Related Topics

Calling the Simplify method | Creating a plug-in data source | Executing spatial queries | How to create a multipoint | How to create a multipoint object from the vertices of a polyline | How to create a union of several polygons | Working with GeometryEnvironment | Writing .NET code using properties