# EPSG:9621

## Similarity transformation

### Attributes

Data source: EPSG

Information source: EPSG guidance note #7-2, http://www.epsg.org

Revision date: 2019-11-09

Remarks: Defined for two-dimensional coordinate systems.

### Formula

```Note: These formulas have been transcribed from EPSG Guidance Note #7-2. Users are encouraged to use that document rather than the text which follows as reference because limitations in the transcription will be avoided.

The similarity transformation in algebraic form is:

XT = XT0  + XS * M * cos q  + YS * M * sin q
YT = YT0  – XS * M * sin q  + YS * M * cos q

where:
XT0 , YT0    =   the coordinates of the origin point of the source coordinate reference system expressed in the target coordinate reference system;
M                 =  the length of one unit in the source coordinate reference system expressed in units of the target coordinate reference system;
q                  = the angle about which the axes of the source coordinate reference system need to be rotated to coincide with the axes of the target coordinate reference system, counter-clockwise being positive. Alternatively, the bearing of the source coordinate reference system Y-axis measured relative to target coordinate reference system north.

The similarity transformation can also be described as a special case of the parametric affine transformation where coefficients A1 = B2  and  A2 =  - B1.

Reversibility
The reverse formula for the Similarity Transformation is:

XS = [(XT  – XTO) * cos q   –  (YT – YTO) * sin q ] / [M ]
YS = [(XT   – XTO) * sin q   +  (YT – YTO) * cos q] / [M ]

An alternative approach for the reverse operation is to use the same formula as for the forward computation but with different parameter values:
XT = XTO'  + XS * M' * cos theta'  + YS * M' * sin theta'
YT = YTO'  –  XS * M' * sin theta' + YS * M' * cos theta'

The reverse parameter values, indicated by a prime ('), can be calculated from those of the forward operation as follows:
XTO' =  (YTO sin theta –  XTO cos theta) / M
YTO' =  –(YTO cos theta +  XTO sin theta) / M
M'   =  1/M
theta'    =  –theta```

### Example

```ED50 / UTM zone 31N to ETRS89 / UTM zone 31N

Parameters of the Similarity Transformation:
XTO   = -129.549 metres
YTO   = -208.185 metres
M     = 1.00000155
theta = 1.56504" = 0.000007588 rad

Forward computation for source coordinates 300000m E, 4500000m N:

E(ETRS89) = –129.549 + 300000.465 + 34.144
= 299905.060 m E

N(ETRS89) = –208.185 –2.276 + 4500006.977
= 4499796.515m N

Reverse computation of ETRS89 / UTM 31N coordinates 299905.060m E, 4499796.515m N:

E(ED50) = (300034.609 – 34.144) / 1.00000155
= 300000.000m E

N(ED50) = (2.276 + 4500004.700) / 1.00000155
= 4500000.000m N

Alternative reverse computation:

First calculate new parameter values:
XTO'   = 129.5472 m
YTO'   = 208.1857 m
M'     = 0.99999845