# General Total Least Squares Theory for Geodetic Coordinate Transformations
## 1 Introduction  
Transformations are a frequently encountered procedure in geodesy, Global Positioning System (GPS) science and technology, geographical information science (GIS), and other scientific fields. For example, (1) a 3D similarity transformation is usually applied to transform GPS- (World Geodetic System 84) WGS84-based coordinates to those in a local coordinate system using a bunch of common points with coordinate values in both systems. (2) In GIS, digital data produced by tracing old paper maps over a digitizing tablet need to be converted from the tablet's non-georeferenced plane data into georeferenced plane data that can be georegistered with other digital data layers. (3) For the purpose of monitoring a whole dam, the combining of multiple point clouds from different laser stations is needed by transformations. This process is called registration of the scans/images in photogrammetry and remote sensing. (4) In computer vision, mapping a single shape obtained from one sensor to a single shape obtained from another by computing an appropriate transformation between them makes the image 3D visible.  
A common approach to solving the transformation problem is the least squares (LS) adjustment of the transformation parameters from a redundant set of nonlinear forms of the Gauss-Markov (GM) model. However, the GM model assumes that only the coordinates of the target points are random in the observation vector within the GM model. It is obvious that uncertainties from the source coordinate system are missing in the coefficient matrix within the GM model [1; 2].  
Taking the uncertainties in the coefficient matrix into account, the symmetric transformation problems are referred to as the errors-in-variables (EIV) model, and the LS estimation within the EIVmodel is called total least squares (TLS) estimation [3; 4; 5; 6; 7; 8]. There are several classes of methods to obtain TLS solutions: 1) Procrustes analysis (e.g., [9; 10]); 2) quaternions (e.g., [5; 11; 12]); (3) the Lagrange approach (e.g., [8; 13; 14; 15; 16]); and 4) unconstrained optimization (e.g., [3; 17; 18]). From the numerical point of view, although the analytical method is available for certain special covariance matrices [19], transformation problems are solved by iterative methods in general, for example, the Gauss-Helmert model, the iterative GM model, or the sequential quadratic program (SQP).  
Although the aforementioned transformation problems have been successfully addressed, they all focus on the similarity transformations. When we incorporate constraints into the EIV model, all kinds of transformations, including affine, orthogonal, and rigid types, can be formulated. [17] proposed SQP to provide the constrained TLS solution for certain types of transformations. [13] implemented variance component estimation for the EIV model with constraints. However, no one has solved the constrained TLS problem using a Gauss-Newton (GN)-type solver, which is much easier than SQP, and the statistical characteristics of the parameter estimates are straightforwardly available.  
In this paper, we propose a constrained TLS algorithm by iteratively using the constrained TLS normal equation. The algorithm is suitable for solving all kinds of transformation problems, either in 2D or in 3D. Furthermore, the statistical characteristics of the parameter estimates are explicitly given by the inverted constrained normal matrix.  
The remainder of this paper is organized as follows: First, we give the mathematical formulation of the constrained TLS problem and its relation to the transformation models in Section 2. Second, we solve the TLS problem algebraically using Lagrange multipliers in Section 3. Third, in Section 4, we design the unconstrained and constrained TLS algorithm for all kinds of transformations. Two examples are given in Section 5 to demonstrate the performance of the proposed robust methods in 2D and 3D. Finally, we draw conclusions in Section 6.