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


ISpatialReferenceInfo Interface (ArcObjects .NET 10.7 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceInfo Interface
ArcGIS Developer Help

ISpatialReferenceInfo Interface

Provides access to members that control the properties common to all components of a spatial reference system.

Product Availability

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

Members

Name Description
Read-only property Abbreviation The abbreviated name of this spatial reference component.
Read-only property Alias The alias of this spatial reference component.
Read-only property FactoryCode The factory code (WKID) of the spatial reference.
Read-only property Name The name of this spatial reference component.
Read-only property Remarks The comment string of this spatial reference component.

Classes that implement ISpatialReferenceInfo

Classes Description
AngularUnit Creates a angular unit of measure.
Datum Creates a datum.
GeographicCoordinateSystem Creates a geographic coordinate system.
HVDatumTransformation Horizontal and Vertical datum transformation.
LinearUnit Creates a linear unit of measure.
Parameter Creates a parameter.
PrimeMeridian Creates a prime meridian.
ProjectedCoordinateSystem Creates a projected coordinate system.
Spheroid Creates a spheroid.
UnknownCoordinateSystem Creates an unknown coordinate system.
VerticalCoordinateSystem Creates a vertical coordinate system.
VerticalDatum Creates a vertical datum.
[C#]

    private void PrintSpatialReferenceInfo()
    {
        // use activator class with SpatialReferenceEnvironment singleton
        Type factoryType = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");
        System.Object obj = Activator.CreateInstance(factoryType);
        ISpatialReferenceFactory3 spatialReferenceFactory = obj as ISpatialReferenceFactory3;

        ISpatialReference spatialReference = spatialReferenceFactory.CreateSpatialReference((int)esriSRGeoCSType.esriSRGeoCS_WGS1984);
        ISpatialReferenceInfo spatialReferenceInfo = spatialReference as ISpatialReferenceInfo;

        System.Windows.Forms.MessageBox.Show(spatialReferenceInfo.Abbreviation);
        System.Windows.Forms.MessageBox.Show(spatialReferenceInfo.Alias);
        System.Windows.Forms.MessageBox.Show(spatialReferenceInfo.FactoryCode.ToString());
        System.Windows.Forms.MessageBox.Show(spatialReferenceInfo.Name);
        System.Windows.Forms.MessageBox.Show(spatialReferenceInfo.Remarks);
    }