Returns the transformation matrix that transforms points given in the Project Origin’s coordinate system into the Survey Point’s coordinate system.
GSErrCode ACAPI_Environment ( APIEnv_GetSurveyPointTransformationID, API_Tranmat* apiSPTransformation );
Parameters
- apiSPTransformation
- [out] the calculated transformation matrix
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
apiSPTransformation
isnullptr
For other common API errors see the API Errors document.
Remarks
This function computes a transformation matrix that transforms the coordinates of a given point in the Project Origin’s coordinate system into the Survey Point’s coordinate system.
Example
API_Tranmat tm; if (ACAPI_Environment (APIEnv_GetSurveyPointTransformationID, &tm) == NoError) { API_Coord3D pointInProject = { 1.0, 1.0, 0.0 }; API_Coord3D coordInSPSystem; coordInSPSystem.x = tm.tmx[0]*pointInProject.x + tm.tmx[1]*pointInProject.y + tm.tmx[2]*pointInProject.z + tm.tmx[3]; coordInSPSystem.y = tm.tmx[4]*pointInProject.x + tm.tmx[5]*pointInProject.y + tm.tmx[6]*pointInProject.z + tm.tmx[7]; coordInSPSystem.z = tm.tmx[8]*pointInProject.x + tm.tmx[9]*pointInProject.y + tm.tmx[10]*pointInProject.z + tm.tmx[11]; ACAPI_WriteReport ("Point coordinates in the Survey Point's coordinate system: x=%lf, y=%lf, z=%lf", false, coordInSPSystem.x, coordInSPSystem.y, coordInSPSystem.z); }
Requirements
- Version: API 25 or later
- Header: APIdefs_Environment.h
See Also
API_Tranmat
APIEnv_GetGeoLocationID
APIEnv_SetGeoLocationID
ACAPI_Environment
API Functions