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


ISpatialReferenceFactory.CreateSpheroid 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.CreateSpheroid Method
ArcGIS Developer Help

ISpatialReferenceFactory.CreateSpheroid Method

Creates a predefined spheroid.

[Visual Basic .NET]
Public Function CreateSpheroid ( _
    ByVal spheroidType As Integer _
) As ISpheroid
[C#]
public ISpheroid CreateSpheroid (
    int spheroidType
);
[C++]
HRESULT CreateSpheroid(
  long spheroidType
);
[C++]
Parameters
spheroidType 

spheroidType is a parameter of type long

Product Availability

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

Description

Use an element from the esriSRSpheroidType or esriSRSpheroid2Type enumerations as the spheroidType to create a particular predefined spheroid.

[C#]

            ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass();
            //Create the spheroid using the available spheroids. These can be
            //found in the esriGeometry esriSRSpheroidType enumeration.
            ISpheroid spheroid = spatialReferenceFactory.CreateSpheroid((int)esriSRSpheroidType.esriSRSpheroid_Clarke1866);

[Visual Basic .NET]

        Dim pSpatRefFact As ESRI.ArcGIS.Geometry.ISpatialReferenceFactory
        'Set the spatial reference factory to a new spatial reference environment
        pSpatRefFact = New ESRI.ArcGIS.Geometry.SpatialReferenceEnvironment

        Dim pSpher As ESRI.ArcGIS.Geometry.ISpheroid 'Create the spheroid using the available spheroids. These can be
        'found in the esriGeometry esriSRSpheroidType enumeration.
        pSpher = pSpatRefFact.CreateSpheroid(ESRI.ArcGIS.Geometry.esriSRSpheroidType.esriSRSpheroid_Clarke1866)

See Also

ISpatialReferenceFactory Interface | esriSRSpheroidType Constants | esriSRSpheroid2Type Constants

.NET Samples

Clonable object