GM_AddCustomDatum |
Adds a new custom datum definition based on the provided GM_DatumInfo_t structure.
GM_DLL_EXPORTED GM_Error_t32 __stdcall GM_AddCustomDatum ( const GM_DatumInfo_t* aDatumInfo, // IN: Information about datum transformation to add DATUM* aDatumCode // OUT: Datum code assigned to new custom datum )
The datum code assigned for the new datum is returned in aDatumCode. If a custom datum with the same name already exists, the parameters for that datum will be updated.
EXAMPLE 1: - Add custom Bursa-Wolfe datum (this is identical to Lisboa 1937 datum)// Setup the custom datum information GM_DatumInfo_t theDatumInfo; ::memset( &theDatumInfo, 0, sizeof theDatumInfo ); theDatumInfo.mMethod = GM_Datum_BursaWolfe; theDatumInfo.mDatumName = "DLx"; theDatumInfo.mEllipsoidName = "International 1909 (Hayford/Intl 1924)"; // Name of ellipsoid this datum is based on theDatumInfo.mDeltaX = -288.88; theDatumInfo.mDeltaY = -91.74; theDatumInfo.mDeltaZ = 126.24; theDatumInfo.mScale = -4.598E-6; theDatumInfo.mRotX = -1.6910; // X rotation in arc seconds theDatumInfo.mRotY = 0.41; // Y rotation in arc seconds theDatumInfo.mRotZ = -0.211; // Z rotation in arc seconds // Add the datum DATUM theDatumCode = GM_DATUM_UNKNOWN; GM_Error_t32 theRetCode = GM_AddCustomDatum( &theDatumInfo, &theDatumCode );