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


ISpatialReferenceFactory.CreatePredefinedPrimeMeridians Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceFactory Interface > ISpatialReferenceFactory.CreatePredefinedPrimeMeridians Method
ArcGIS Developer Help

ISpatialReferenceFactory.CreatePredefinedPrimeMeridians Method

Creates a list of predefined prime meridians.

[Visual Basic .NET]
Public Function CreatePredefinedPrimeMeridians ( _
) As ISet
[C#]
public ISet CreatePredefinedPrimeMeridians (
);
[C++]
HRESULT CreatePredefinedPrimeMeridians(
void
);

Product Availability

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

Description

Returns a list of all predefined prime meridians. The list has two columns: the factory code and the name.

[C#]

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

        ISet primeMeridiansSet = spatialReferenceFactory.CreatePredefinedPrimeMeridians();
        System.Windows.Forms.MessageBox.Show("Number of projections = " + primeMeridiansSet.Count);
        for (int i = 0; i < primeMeridiansSet.Count; i++)
        {
            IPrimeMeridian primeMeridian = primeMeridiansSet.Next() as IPrimeMeridian;
            System.Windows.Forms.MessageBox.Show(primeMeridian.Name);
        }
    }

See Also

ISpatialReferenceFactory Interface