START First steps Deutsch Guide : Transformation by control points

Page contents

Control points and new points to be transformed System of transformation equations Planar transformations (2D) Spatial transformations (3D) Planar transformations with adjustment of the vertical offset Least squares adjustment Parameters of the reverse transformation Cuboid through four vertices In the library
Control points are used for the computation of transformation parameters between two coordinate systems. All planar or spatial transformations are computed, which are computable from these points. In both systems there may be given non-control points, which are transformed by the computed parameters.

START First steps Deutsch

righthanded system
righthanded system
lefthanded system
lefthanded system

IN DUBIO PRO GEO computes planar and spatial coordinate transformations, i.e. conversions of point coordinates of an source system to coordinates of a target system. We do not require any special approximate alignment of the axes of the systems. Coordinates are specified via .

Cartesian lefthanded, cartesian righthanded systems (XYZ) and grid systems (northing,easting,height) (or other succession of coordinates) can by transformed immediately. Ellipsoidal systems (latitude,longitude,height) must first be converted with . See coordinate system type.

The coordinates in the source system are always denoted by x,y,z and in the target system by X,Y,Z . For grid coordinates we identify north = x and/or X, east = y and/or Y and height = z and/or Z.

START First steps Deutsch Control points and new points to be transformed

Transformation
by control points
Transformation by control points

Control points are identified automatically by identical pointnames. Whenever possible, transformation parameters are computed from those coordinates.

Additionally, there may be points with coordinates given only in one of the systems (new points). The computed transformation is applied to them. There may be new points in both systems at the same time.

All points can be specified in the coordinate lists in arbitrary succession.

START First steps Deutsch System of transformation equations

All implemented geodetic coordinate transformations are computed, which fulfill the following three conditions.

All transformations use the following template of a system of transformation equations :

  V = t + T · v v , V are the position vectors of points in the source and target system.
t is the translation vector (= shift vector).
T is the transformation matrix.

The succession of the components of v, V, t, T is always XYZ, even if the coordinates in the have a different succession. Depending on the type of transformation, Teffects

For each computed transformation all transformation equations are given in the above form, such that all additional computations can be performed, e.g. the transformation of additional points. Often it is appropriate to specify the transformation by transformation parameters. Unfortunately, there is a multitude of possibilities, how to do this, which are supported here almost completely:

It is easiest to represent T as a product of at most three matrices:

The different types of transformation differ with respect to the set of factors, which compose T , and their succession. For the affine transformation, T can be decomposed into all three factors in arbitrary succession:

T = Q1M1S1 = Q2S2M2 = M3S3Q3 = S4M4Q4

The factors themselves depend in general on the succession of the decomposition, e.g. you get S1 ≠ S2 ≠ S3 ≠ S4. All above-listed decompositions are computed.

START First steps Deutsch Planar transformations (2D)

Z coordinates or heights are not influenced by planar transformation, they may therefore be missing. If heights are given for some or all points in grid systems then they are used to determine the grid scale factor .

Whenever possible, the following transformations are computed one after the other:

TransformationParameterNumberContr.P. Transformation matrix T
Affine tx , ty , mx , my , ε , τ   6≥ 3 is a general 2×2 matrix
5-Param. type 1 tx , ty , mx , my , ε   5≥ 3 has orthogonal row vectorsT=MQ
5-Param. type 2 tx , ty , m , τ , ε   5≥ 3 T=mSQ
5-Param. type 3 tx , ty , ε , mx , my  5≥ 3 has orthogonal column vectorsT=QM
5-Param. type 4 tx , ty , m , ε , τ   5≥ 3 T=mQS
Helmert tx , ty , m , ε   4≥ 2 is the scalar multiple of an orthogonal matrixT=mQ
with fixed scale tx , ty , ε   3≥ 2 is an orthogonal matrixT=Q

The translation vector t and the matrices Q, S, M have the following representation:

t=
tx
ty
without
reflexion:
Q =
cos(ε)-sin(ε)
sin(ε) cos(ε)
with
reflexion:
Q =
sin(ε) cos(ε)
cos(ε)-sin(ε)
S =
1tan(τ)
01
=
1f
01
M =
mx 0
0 my
planar lefthanded (left)
and righthanded (right) system,
rotation and shear mapping
planar lefthanded (left) and righthanded (right) system, shear mapping & rotation

The rotation angle ε is the rotation angle from the source system to the target system about the origin. In the lefthanded system ε>0 means a clockwise rotation, in the righthanded system conversely.

planar lefthanded (left)
and righthanded (right) system,
rotation and shear mapping
planar lefthanded (left) and righthanded (right) system, rotation & shear mapping

After a shear mapping, the axes of the source system do not enclose a right angle, but an angle diminished by the shear angle τ or enlarged by . In the computation protocol the shear factor f = tan(τ) is also reported.

The scale factors mx , my are always positive and for some transformations of equal size. mx = my = m > 1 means that the points are pulled apart. The grid scale factors are not included. E.g., if you change the grid to cartesian, the scale factors may also change.

START First steps Deutsch Spatial transformations (3D)

Three coordinates must be given for all points. If the transformation type auto-detect is chosen, then spatial transformations are computed whenever this condition is satisfied and the third coordinates of all points are not all identical. Otherwise, it is tried to compute planar transformations.

Whenever possible, the following transformations are computed one after the other:

TransformationParameterNumberContr.P.Transformation matrix T
Affine tx , ty , tz , mx , my , mz ,
εx , εy , εz , τxy , τxz , τyz
  12≥ 4 is a general 3×3 matrix
9-Param. Type 1 tx , ty , tz , mx , my , mz ,
εx , εy , εz
  9≥ 3 has orthogonal row vectorsT=MQ
9-Param. Type 2 tx , ty , tz , εx , εy , εz ,
mx , my , mz
  9≥ 3 has orthogonal column vectorsT=QM
Helmert tx , ty , tz , m , εx , εy , εz   7≥ 3 is the scalar multiple of an orthogonal matrixT=mQ
with fixed scale tx , ty , tz , εx , εy , εz   6≥ 3 is an orthogonal matrixT=Q

The translation vector t and the matrices S, M have the following representations:

t=
tx
ty
tz
S =
1tan(τxy)tan(τxz)
0 1tan(τyz)
0 0 1
=
1fxyfxz
01fyz
001
M =
mx 0 0
0 my 0
0 0 mz

The 3D shear mapping represented by S may be viewed as a sequence of three planar shear mappings, in particular

  1. a shear of y and z axis with shear angle τyz
  2. a shear of x and z axis with shear angle τxz
  3. a shear of x and y axis with shear angle τxy

If one interchanges the 1st and 2nd or the 2nd and 3rd planar shear mapping, one approximately obtains the same shear angles τij, if they are small. In the computation protocol the shear factors fij = tan(τij) are also reported.

The 3D scaling has up to three scale factors. The two scale factors of planar transformations are completed by a 3rd scale factor mz .

The matrix Q is in the case without reflection a rotation matrix and can be represented by parameters in the following three different ways:

(a) with three Eulerian angles εx , εy , εz:

Q=
cosεy·cosεz    sinεx·sinεy·cosεz−cosεx·sinεz sinεx·sinεz+cosεx·sinεy·cosεz
cosεy·sinεz cosεx·cosεz+sinεx·sinεy·sinεz    cosεx·sinεy·sinεz−sinεx·cosεz
−sinεy sinεx·cosεy cosεx·cosεy
spatial lefthanded (left)
and righthanded (right) system,
rotation about z axis
spatial lefthanded (left) and righthanded (right) system, rotation about z axis

The total rotation can be viewed as a sequence of three rotations about coordinate axes. We use the geodetic convention:

  1. Rotation about the x axis, rotation angle εx
  2. Rotation about the y axis, rotation angle εy
  3. Rotation about the z axis, rotation angle εz

There are alternative conventions in use, mainly in the non-geodetic branches.

(b) with the quadruple of the unit quaternion (q0 , q1 , q2 , q3):

Q=
q0²+q1²−q2²−q3²   2(q1·q2−q0·q3)2(q1·q3+q0·q2)
2(q1·q2+q0·q3)q0²−q1²+q2²−q3²   2(q2·q3−q0·q1)
2(q1·q3−q0·q2)2(q2·q3+q0·q1)q0²−q1²−q2²+q3²

A quaternion usually permits a more elegant description of rotations in three dimensions than Eulerian angles. The four parameters satisfy the condition q0²+q1²+q2²+q3²=1 (unit quaternion).

(c) with Eulerian axis (ex , ey , ez) as a unit vector and rotation angle ε about it:

Q=
cosε+ex²(1-cosε)exey(1-cosε)−ezsinε exez(1-cosε)+eysinε
exey(1-cosε)+ezsinε   cosε+ey²(1-cosε) eyez(1-cosε)−exsinε
exez(1-cosε)−eysinεeyez(1-cosε)+exsinε    cosε+ez²(1-cosε)

The rotation is here described about an oblique axis through the origin of the coordinate system, the so-called Eulerian axis. The parameters satisfy the condition ex²+ey²+ez²=1 (unit vector).

All angles εx, εy, εz, ε are computed between -π = -180° = -200 gon and π = 180° = 200 gon in the chosen angle unit. They are defined

The viewing direction for this is opposite to the rotation axis. Negative rotation angles ε are avoided by reverting the Eulerian axis.

There are alternative conventions in use, mainly in the non-geodetic branches.

If the source system is a lefthanded system and the target system is a righthanded system or vice versa, T must additionally generate a reflexion . The indication of this is det(T)<0. We realize this by mirroring at the yz plane.

START First steps Deutsch Planar transformations with adjustment of the vertical offset

Adjustment of the vertical offset
Adjustment of the vertical offset

In this case it is assumed that the vertical axes (Z or height) of both systems are parallel and have the same scale. From all control points with three coordinates in both systems the vertical offset is computed. At least one such point must exist. This offset is used to transform all non-control points into the opposite system. To the other two coordinates all applicable planar transformations listed above are applied.

START First steps Deutsch Least squares adjustment

If the number of coordinates of control points exceeds the number of transformation parameters in a transformation (redundancy) then an adjustment is computed by the method of weighted least squares. In this case accuracy measures are required, either a standard deviation σ or a weight p . In the first case the weight is computed by p=1/σ². For this purpose two modes are implemented:

Simple weighting (standard mode)
Accuracy measures can be chosen equal for each coordinate of the same kind, such that up to six measures can be specified.
Individual weighting (expert mode)
Herewith you can assign an individual accuracy measure to each coordinate of each control point.
WeightStdWhen computing the transformation parameters,
the corresponding coordinate will be
0INFignored.
INF or empty field0 or empty fieldused as a constraint.

After the adjustment there are often residuary misclosures. They coincide by magnitude to the residuals of least squares adjustment, but have the opposite sign:

  residuary misclosure = given coordinate − coordinate computed from transformation parameters

Under the bonnet: Internally, IN DUBIO PRO GEO always works with the elements of t and T as adjustment parameters. For planar transformations we always get 6 parameters and for spatial transformations we get 12 parameters. For all non-affine transformations the restriction to special transformation matrices T is realised by restrictions for the elements of T . Only after the adjustment, scale, shear and rotation parameters are computed by QR or RQ decomposition of T In view of this, adjustment parameters and transformation parameters must be distinguished, except for the affine transformation.

START First steps Deutsch Parameters of the reverse transformation

If also transformation parameters of the reverse transformation are required, it is recommended to change the transformation direction by swapping the systems. Note that the parameters of the reverse transformation are not always obtained by reversing the signs of the angles and by inverting the scale factors.

START First steps Deutsch Cuboid through four vertices

Cuboid through four vertices
Cuboid through four vertices

Four vertices A,B,E,H of a cuboid ABCDEFGH with edges not parallel to coordinate axes are measured by tacheometry (⇒ figure). With a standard deviation of 0.02 the following coordinates in the station system (cartesian lefthanded system) X,Y,Z are obtained therefrom:

    X        Y        Z
A   14.029   17.058    8.073   
B   23.616   29.751    5.516   
E   14.272   20.210   24.880
H   32.863    6.737   27.163

For all points C,D,F,G of the cuboid not sighted, the coordinates in the same system need to be determined.

object
coordinates
   x  y  z
A  0  0  0
B  0  1  0
C  1  1  0
D  1  0  0
E  0  0  1
F  0  1  1
G  1  1  1
H  1  0  1

In addition to the station system xyz we introduce an object coordinate system xyz as displayed above as a cartesian lefthanded system with axes along the edges of the cuboid. However, the edge lengths are not known. (The values in the figure above represent the true solution.) So we take these lengths as units of the coordinate axes. In this way for each coordinate axis a different length unit is defined. Now we assign object coordinates to the points A…H. They are treated as error-free.

The spatial transformation from the object system to the station system must effect

  1. three scale changes of the axes x,y,z and afterwards
  2. one rotation about the Eulerian axis or
    three rotations about the coordinate axes x,y,z

Therefore, the appropriate transformation is a 9 parameter transformation type 2.

and Compute

From these coordinates, only the affine transformation and the 9 parameter transformation type 2 can be reasonably computed. For the other transformations, the control points do not approximately match (large residuary misclosures).

Result for the 9 Parameter Transformation Type 2 (3 scales ⇒ rotation)

The least squares method converged after 3 iterations.

X
Y
Z
=
14.04018241
17.04096213
8.06932903
+
18.5716594 9.56082510 0.24339293
-13.4982723 12.72223499 3.18419440
2.2883147 -2.54868580 16.80752749
.
x
y
z
comp.object systemstation system
pointsxyz XYZ
A00014.040182417.0409621 8.0693290
B01023.601007529.7631971 5.5206432
C11042.172666916.2649248 7.8089579
D10032.6118418 3.542689810.3576437
E00114.283575320.225156524.8768565
F01123.844400432.947391522.3281707
G11142.416059819.449119224.6164854
H10132.8552347 6.726884227.1651712
resid.xyzXYZ
A000-0.0111824 0.0170379 0.0036710
B000 0.0149925-0.0121971-0.0046432
E000-0.0115753-0.0151565 0.0031435
H000 0.0077653 0.0103158-0.0021712

The residuary misclosures in the object system x,y,z are zero because they are assumed to be error-free. The residuary misclosures in the station system X,Y,Z account to a maximum of 0.017 and are therefore plausible.

Prove that the new station system coordinates X,Y,Z of the 9 parameter transformation type 2 exactly represent a cuboid. Hint: Save coordinates and compute in . Confirm that this would be only approximately true for the affine transformation.

Use the button to compute the reverse transformation. (Javascript must not be disabled.) Note that now the 9 parameter transformation type 1 is the desired transformation. The coordinates of the new points are identical.

Did you know? If you use grid systems, then the grid scale factor is always applied.

START First steps Deutsch







START First steps Deutsch In the library

Link Author(s)Title Year Type Pages
MByte
PDF: open accessLehmann RTransformation model selection by multiple hypotheses testing201414
0.1
PDF: restricted accessLösler M, Eschelbach CZur Bestimmung der Parameter einer räumlichen Affintransformation20145
0.1
PDF: restricted accessLehmann RIm Schwerpunkt der Anschlusspunkte – Zur Genauigkeit geodätischer Koordinatentransformationen20107
0.1
PDF: open accessLehmann RIm Schwerpunkt der Anschlusspunkte – Zur Genauigkeit geodätischer Koordinatentransformationen (postprint)201013
1
PDF: restricted accessNitschke M, Knickmeyer EHRotation parameters - a survey of techniques200023
0.1