GeocentricCoordSys Constructor

public GeocentricCoordSys()

public 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(GeoCalc.DataSource & data)

{

GeoCalc.GeocentricCoordSys cs;

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

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

cs.set_Datum(*datum);

cs.set_PointStyle(*ptStyle);

 

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

GeoCalc.CartesianPoint * targetPt = (GeoCalc.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;

}