set_InvFlatDefinitive Method

WRAPPER_API void set_InvFlatDefinitive(bool value)

 

Description

The set_InvFlatDefinitive sets whether the InverseFlattening property should define the Ellipsoid.  If set to true, the SemiMajor and InverseFlattening properties define the Ellipsoid.  If set to false, then the SemiMajor and SemiMinor properties define the Ellipsoid.

In order to define a sphere, one must first call this method with an argument of false.  It is not valid to define a sphere using the SemiMajor and InverseFlattening properties.  One must use the SemiMajor and SemiMinor properties to define a sphere.

 

Example

void Ellipsoid_setInvFlatDefinitive(GEOCALCPBW_NAMESPACE::DataSource & data)

{

GEOCALCPBW_NAMESPACE::Ellipsoid ell;

GEOCALCPBW_NAMESPACE::LinearValue semiMaj;

semiMaj.set_InMeters(6378137);

ell.set_SemiMajor(semiMaj);

ell.set_InvFlatDefinitive(true);

ell.set_InverseFlattening(298.257223563);

 

GEOCALCPBW_NAMESPACE::GeodeticPoint * fromPt = data.GetGeodeticPoint(L"BMG", L"GEODETIC_POINT_DEGREES");

GEOCALCPBW_NAMESPACE::GeodeticPoint * toPt = data.GetGeodeticPoint(L"BMG", L"GEODETIC_POINT_DEGREES");

fromPt->set_InUnits(-77.36, 45.45);

double azimuth = 1.004;

double geodesic = 1336;

if(! ell.ComputeDirect(*fromPt, geodesic, azimuth, *toPt))

{

AfxMessageBox("ComputeDirect failed");

}

 

delete fromPt;

delete toPt;

}