GeocentricCoordSys Constructor

WRAPPER_API GeocentricCoordSys()

WRAPPER_API GeocentricCoordSys(const GeocentricCoordSys &source)

 

Description

The CreateGeocentricCoordSys constructor creates a new instance of the GeocentricCoordSys class.  There are two signatures for this constructor.  The default constructor takes no arguments and produces a GeocentricCoordSys in which the Datum property must be set before the coordinate system can be used.  The second constructor is a copy-constructor, which produces a GeocentricCoordSys that has the same value as the object passed as argument.

 

Example

void GeocentricCoordSys_GeocentricCoordSys(GEOCALCPBW_NAMESPACE::DataSource & data)

{

GEOCALCPBW_NAMESPACE::GeocentricCoordSys cs;

GEOCALCPBW_NAMESPACE::HorizontalDatum * datum = data.GetHorizontalDatum(L"BMG", L"WGS84");

GEOCALCPBW_NAMESPACE::CartesianPoint * ptStyle = data.GetCartesianPoint(L"BMG", L"CARTESIAN_POINT_METERS");

cs.set_Datum(*datum);

cs.set_PointStyle(*ptStyle);

 

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

GEOCALCPBW_NAMESPACE::CartesianPoint * targetPt = (GEOCALCPBW_NAMESPACE::CartesianPoint *)cs.get_PointStyle().CloneCoordPoint();

sourcePt->set_InUnits(-77, 45);

if(! cs.FromGeodeticBase(*sourcePt, *targetPt))

{

AfxMessageBox("FromGeodeticBase failed");

}

 

delete datum;

delete ptStyle;

delete sourcePt;

delete targetPt;

}