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


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

ISpheroidEdit.Define Method

Defines the properties of a spheroid.

[Visual Basic .NET]
Public Sub Define ( _
    [ByRef Name As Object], _
    [ByRef Alias As Object], _
    [ByRef Abbreviation As Object], _
    [ByRef Remarks As Object], _
    [ByRef majorAxis As Object], _
    [ByRef Flattening As Object] _
)
[C#]
public void Define (
    ref object Name,
    ref object Alias,
    ref object Abbreviation,
    ref object Remarks,
    ref object majorAxis,
    ref object Flattening
);
[C++]
HRESULT Define(
  Variant* Name,
  Variant* Alias,
  Variant* Abbreviation,
  Variant* Remarks,
  Variant* majorAxis,
  Variant* Flattening
);
[C++]
Parameters
Name [optional]

Name is a parameter of type VARIANT* Alias [optional]
Alias is a parameter of type VARIANT* Abbreviation [optional]
Abbreviation is a parameter of type VARIANT* Remarks [optional]
Remarks is a parameter of type VARIANT* majorAxis [optional]
majorAxis is a parameter of type VARIANT* Flattening [optional]
Flattening is a parameter of type VARIANT*

Product Availability

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

Description

The majorAxis parameter represents the semimajor axis. For example, the semimajor axis of the WGS 1984 spheroid is 6378137.0 meters. The flattening value is a small number, such as 0.003352811 (WGS 1984). Often the inverse flattening value is used instead, 298.257223563, and that is what is reported in a well-known text (WKT) version of spheroid. The Define method expects the true flattening value.

[C#]     public ISpheroid DefineSpheroid()
    {            ISpheroid spheroid = new SpheroidClass();
        //cast interface to ISpheroidEdit            
        ISpheroidEdit spheroidEdit = spheroid as ISpheroidEdit;           
        //Define the properties of the spheroid            
        object name = "GRS_1980";           
        object alias = "GRS_1980";           
        object abbreviation = "GRS80";           
        object remarks = "Thespheroid is GRS_1980";           
        object majorAxis = 6378137; ;           
        object flattening = 1 / 298.257222101;           
        spheroidEdit.Define(ref name,                               
            ref alias,                               
            ref abbreviation,                               
            ref remarks,                               
            ref majorAxis,                               
            ref flattening                               
            );           
        return spheroidEdit as ISpheroid;       
    }

See Also

ISpheroidEdit Interface