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


IGeoDataset.SpatialReference Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IG > IGeoDataset Interface > IGeoDataset.SpatialReference Property
ArcGIS Developer Help

IGeoDataset.SpatialReference Property

The spatial reference of the GeoDataset.

[Visual Basic .NET]
Public ReadOnly Property SpatialReference As ISpatialReference
[C#]
public ISpatialReference SpatialReference {get;}
[C++]
HRESULT get_SpatialReference(
  ISpatialReference** spref
);
[C++]
Parameters
spref [out, retval]

spref is a parameter of type ISpatialReference**

Product Availability

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

Remarks

This property is read only. For layers, when the first layer is added to ArcMap, its spatial reference is read by this property, and the map is set to this spatial reference.

Instances of the esriCarto.GroupLayer class will return null for this property, as a group layer can contain multiple datasets with different spatial references.

Modifications to a spatial reference returned by this property will not be persisted. To modify the spatial reference of a dataset, the IGeoDatasetSchemaEdit and IGeoDatasetSchemaEdit2 interfaces should be used.

See Also

IGeoDataset Interface

.NET Samples

Implementing a schematic layout algorithm and its layout property page