# Calculating Affine Transformation in QGIS

I have points taken with a Total Station, but the azimuth was set incorrectly so the map is rotated. I have a reference file with common points and in the correct orientation. Both data sets are WGS84 UTM 17S.

I need to use the Affine Transformation tool to rotate the Total Station points into the correct position. I found this post https://gis.stackexchange.com/a/127653/102900 but I don't understand how to do the math to appropriately apply the tool.

Can someone help?

Here are my points (source=incorrect data and target=properly oriented data). There is one point that is constant in both data sets, and that is the set-up point for the Total Station (9799241N, 535885E)- so I would think that the whole thing should just rotate around that point. If it helps, the azimuth rotation was off -174.83 degrees.

``````Point 1
Source: 9799217.526N, 535898.034E
Target: 9799263.186N, 535869.865E

Point 2
Source: 9799328.378N, 535863.717E
Target: 9799155.963N, 535914.254E

Point 3
Source: 9799308.863N, 535924.124E
Target: 9799169.882N, 535852.174E

Point 4
Source: 9799247.955N,535845.868E
Target: 9799237.595N, 535924.599E

Point 5
Source: 9799260.019N,535873.767E
Target: 9799223.04N, 535897.881E

Point 6
Source: 9799251.263N, 535885E
Target: 9799230.779N, 535885.937E
``````

There are multiple possibilities:

1) You use an external tool to calculate the parameters for an Affine-Transformation. These parameters (roughly determined)

``````-0,996904085
-0,090588361
0,091780774
-0,995377938
170734,3654
19601755,3
``````

are then put into the plug-in: 2) You use the vector georeferencing (QGIS plugins)

2.1) PlugIn: VectorBender

2.2) PlugIn: VectorGeoref

I would recommend 2.1). • Those numbers for the affine transformation fixed the problem. Thank you so much! Aug 5 '17 at 14:10