![]() |
This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceFactory Interface > ISpatialReferenceFactory.CreateSpheroid Method (ArcObjects .NET 10.4 SDK) |
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,
ISpheroid** Spheroid
);
[C++]
Parameters spheroidType spheroidType is a parameter of type long Spheroid [out, retval]
Spheroid is a parameter of type ISpheroid
Use an element from the esriSRSpheroidType or esriSRSpheroid2Type enumerations as the spheroidType to create a particular predefined spheroid.
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);
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)
ISpatialReferenceFactory Interface | esriSRSpheroidType Constants | esriSRSpheroid2Type Constants