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 );
Optional Values
[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 VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
Alias [optional] Alias is a parameter of type VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
Abbreviation [optional] Abbreviation is a parameter of type VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
Remarks [optional] Remarks is a parameter of type VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
majorAxis [optional] majorAxis is a parameter of type VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
Flattening [optional] Flattening is a parameter of type VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
Product Availability
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.
{ 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;
}