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 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) | Geoevents in a MapControl (Code Files: GeoEvents) | Move a graphic along a path in ArcMap (Code Files: AnimationUtils) | RSS weather GraphicTracker (Code Files: RSSWeather) | RSS weather layer (Code Files: AddRSSWeatherLayer RSSWeatherLayerClass) | Simple point plug-in data source (Code Files: SimplePointDataset) | StreetMap routing (Code Files: RoutingForm) | Triangle graphic element (Code Files: TriangleElementClass) |

.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 |