Points in the plane and in 3D space are transformed by given parameters. A sequence of up to 13 individual transformation steps can be performed. In this way, all conceivable transformations can be configured.
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.
Each transformation can be imagined as a sequence of elementary transformation steps.
By arbitrary combination of the steps
Translation = shifting
Scaling
= scale change, for grid systems not including the
grid scale factor
Rotation
Transvection = shear mapping
Reflexion
= mirroring from lefthanded to righthanded system or vice versa
using the parameters
shift and rotation parameters
scaling and shear parameters
tx
translation along x axis
mx
scale factor of x axis
ty
translation along y axis
my
scale factor of y axis
tz
translation along z axis
mz
scale factor of z axis
mxy
scale factor of x and y axis
εx
Eulerian angle for rotation about x axis
m
scale factor of all axes
εy
Eulerian angle for rotation about x axis
fxy
shear factor for y vs. x axis
εz
Eulerian angle for rotation about z axis
fyx
shear factor for x vs. y axis
ε
2D rotation angle (identical to εz)
fxz
shear factor for z vs. x axis
rotation angle about Eulerian axis
fzx
shear factor for x vs. z axis
ex
Eulerian axis, x vector component
fyz
shear factor for z vs. y axis
ey
Eulerian axis, y vector component
fzy
shear factor for y vs. z axis
ez
Eulerian axis, z vector component
τxy
shear angle for y vs. x axis
τyx
shear angle for x vs. y axis
q0
quaternion, 0th component
τxz
shear angle for z vs. x axis
q1
quaternion, 1st component
τzx
shear angle for x vs. z axis
q2
quaternion, 2nd component
τyz
shear angle for z vs. y axis
q3
quaternion, 3rd component
τzy
shear angle for y vs. z axis
all relevant transformation types can be represented. In total up to 13 elementary steps
can be arbitrarily combined. They are processed in the given succession. E.g., it is possible
to perform a translation and a rotation followed by a further translation.
The reflexion is automatically invoked, if the source system is a lefthanded system and
the target system is a righthanded system or vice versa.
In many cases the transformation result depends on the succession of the transformation steps.
The transformation steps involving the z coordinate require,
that all points have three coordinates.
For planar transformations two translation parameters
tx , ty,
for spatial transformations three translation parameters
tx , ty , tz
can be given. They are expected in the natural
length unit
,
i.e. for grid systems not in grid scale. However, if this is desired differently,
then grid systems must be redeclared to cartesian systems, see
Bag of tricks.
Missing translation parameters are treated as zero.
Scale parameters are scale factors applied to the coordinates.
For planar transformations at most two scale parameters
mx , my
, for spatial transformations at most three scale parameters
mx , my , mz
are accepted. All scale parameters must be positive. They do not include the
grid scale factors
.
However, if this is desired differently, then grid systems must be redeclared to cartesian systems, see
Bag of tricks. Missing scale parameters are treated as one.
The transformation equation of the planar
rotation reads:
X
Y
=
cos(ε)
−sin(ε)
sin(ε)
cos(ε)
·
x
y
For all spatial
transformations there is a spatial rotation, which is described in the following three
alternative ways:
(a) with Eulerian angleεx or εy or
εz:
X
Y
Z
=
1
0
0
0
cosεx
-sinεx
0
sinεx
cosεx
·
x
y
z
X
Y
Z
=
cosεy
0
sinεy
0
1
0
-sinεy
0
cosεy
·
x
y
z
X
Y
Z
=
cosεz
-sinεz
0
sinεz
cosεz
0
0
0
1
·
x
y
z
The total rotation can be viewed as a sequence of three rotations about coordinate axes.
Any succession of rotations can be used.
Changing the succession of rotations usually changes the result.
(b) with the quadruple of the
unit quaternion(q0 , q1 , q2 , q3).
A quaternion usually permits a more elegant description of rotations in three dimensions:
X
Y
Z
=
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²
·
x
y
z
If no unit quaternion with
q0²+q1²+q2²+q3²=1
is given then it is scaled to unity.
(c) with Eulerian axis(ex ,
ey , ez) as a unit vector and
rotation angleε about it:
X
Y
Z
=
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ε)
·
x
y
z
The rotation is here described about an oblique axis through the origin of the coordinate
system, the so-called Eulerian axis. If no unit vector with
ex²+ey²+ez²=1
is given then it is scaled to unit length.
All angles ε, εx, εy,
εz are expected between
-π = -180° = -200 gon and π = 180° = 200 gon
and in the chosen angle unit. They are defined
for lefthanded systems positive clockwise,
for righthanded systems positive counterclockwise.
The viewing direction for this is opposite to the rotation axis.
There are alternative conventions in use, mainly in the non-geodetic branches.
Both the parameters
q0, q1, q2, q3and the parameters
ex, ey, ez, ε
form a compound and must be given in the list of transformation parameters as a
consecutive sequence, where the internal succession of the group is arbitrary.
The shear mapping is an affine mapping of the plane onto itself, which preserves the area
of geometric figures, but angles may change. The transformation equations read:
X
Y
=
1
fxy
0
1
·
x
y
X
Y
Z
=
1
fxy
0
0
1
0
0
0
1
·
x
y
z
X
Y
Z
=
1
0
fxz
0
1
0
0
0
1
·
x
y
z
X
Y
Z
=
1
0
0
fyx
1
0
0
0
1
·
x
y
z
X
Y
=
1
0
fyx
1
·
x
y
X
Y
Z
=
1
0
0
0
1
fyz
0
0
1
·
x
y
z
X
Y
Z
=
1
0
0
0
1
0
fzx
0
1
·
x
y
z
X
Y
Z
=
1
0
0
0
1
0
0
fzy
1
·
x
y
z
fxy=tan(τxy) fxz=tan(τxz) fyz=tan(τyz)
Either the shear parameters f
or the shear angles τ
may be specified. All angles are expected between -π/2 = -90° = -100 gon and π/2 = 90° = 100 gon
and in the chosen angle unit. Missing shear parameters are treated as zero.
Clue:
Two consecutive shear mappings with f=fyx=-fxy ≠ 0 are not identical with a rotation with
τ=arctan(f). Angles are not preserved:
As an alternative to the Eulerian angles
εx , εy , εz
also a quaternion (q0 , q1 , q2 , q3)
or Eulerian axis (ex , ey , ez) and rotation angle ε about it are accepted.
The following points with coordinates in a cartesian lefthanded system
form the vertices of a cuboid (ABCD=bottom surface, EFGH=top surface):
X Y Z
A 14.034 17.043 8.067
B 23.605 29.759 5.522
C 42.146 16.239 7.807
D 32.585 3.537 10.349
E 14.281 20.222 24.877
F 23.842 32.924 22.335
G 42.393 19.418 24.617
H 32.841 6.711 27.167
It must be rotated by 45° about its centre axis parallel to AE (⇑ figure)
counterclockwise, as seen from above.
The point to be held fixed during rotation may be the centre point M of the cuboid
M 28.2159 18.2316 16.3426
computed as the mean of all coordinates e.g. with
,
or the centre point of the bottom or top surface. The Eulerian axis
e may be described by the vector
AE=
14.281-14.034
20.222-17.043
24.877-8.067
Since for lefthanded systems, when looking opposite to the rotation axial direction,
the rotation angle is positive clockwise (⇑ Rotation ), the rotation angle ε=−45°
must be specified. As an alternative, you could use EA instead of AE as an axis vector. The you should use
ε = 45° .
The result is
X
Y
Z
=
-2.33842866
23.6949266
-4.44667340
+
0.70716782
0.69550488
-0.12722668
-0.69393365
0.71721800
0.06367434
0.13553508
0.04325843
0.98982774
.
x
y
z
PName
X
Y
Z
A
18.4131166747
26.6934690300
6.1776196987
B
34.3492519040
29.0099229729
5.5057885573
C
37.7669114811
6.5924075628
9.6956467711
D
21.8479666784
4.2788643123
10.3664693981
E
18.6601166747
29.8724690300
22.9876196987
F
34.5790614774
32.1860122804
22.3167970717
G
38.0139114811
9.7714075628
26.5056467711
H
22.0968358509
7.4485422141
27.1853915435
Perform a
using these coordinate lists. All residuary misclosures must be zero,
independent of the weighting.
Did you know?
You must not sign in to IN DUBIO PRO GEO, therefore you work anonymously.