This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceFactory Interface > ISpatialReferenceFactory.CreatePredefinedPrimeMeridians Method (ArcObjects .NET 10.5 SDK) |
Creates a list of predefined prime meridians.
[Visual Basic .NET] Public Function CreatePredefinedPrimeMeridians ( _ ) As ISet
[C#] public ISet CreatePredefinedPrimeMeridians ( );
[C++]
HRESULT CreatePredefinedPrimeMeridians(
ISet** primeMeridians
);
[C++]
Parameters primeMeridians [out, retval]
primeMeridians is a parameter of type ISet
Returns a list of all predefined prime meridians. The list has two columns: the factory code and the name.
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);
}
}