WRAPPER_API bool ComputeRadiusAtLatitude(const AngularValue &latitude, LinearValue &radius) const
The ComputeRadiusAtLatitude method computes the radius of the Ellipsoid at the specified latitude. The radius is returned as the LinearValue passed as the second argument to the method. The method returns a boolean value indicating the success of the operation.
void Ellipsoid_ComputeRadiusAtLatitude()
{
GEOCALCPBW_NAMESPACE::Ellipsoid ell;
GEOCALCPBW_NAMESPACE::LinearValue semiMaj;
semiMaj.set_InMeters(6378137);
ell.set_SemiMajor(semiMaj);
if(ell.get_InvFlatDefinitive())
{
ell.set_InverseFlattening(298.257223563);
}
else
{
GEOCALCPBW_NAMESPACE::LinearValue semiMin;
semiMin.set_InMeters(6356752.31424518);
ell.set_SemiMinor(semiMin);
}
GEOCALCPBW_NAMESPACE::AngularValue lat;
lat.set_InDegrees(45.66);
GEOCALCPBW_NAMESPACE::LinearValue radius;
if(! ell.ComputeRadiusAtLatitude(lat, radius))
{
AfxMessageBox("ComputeRadiusAtLatitude failed");
}
}