2

I'm trying to use the QGIS plugin vector affine transformation to translate a shapefile with wrong coordinates using the right coordinates of another shapefile. It looks like thisenter image description here

I read other answers to this problem but still my transformation does not work. I take the coordinates of 3 points of the original shapefile:

396379.157,4992456.237
396434.636,4992428.498
396494.740,4992398.908

I take the coordinates of the same 3 points of the target shapefile:

396373.609,4992445.141
396431.169,4992416.939
396492.312,4992386.888

Then from online solver I get parameters to include into the transformation matrix:

U = -0.276
V = -2.628
W = 13625340.309
X = 19.103
Y = -197.695
Z = 380203686.883

or using another solver:

q = -0.279
r = -2.634
s = 13657434.35
t = 48.227
u = 158.434
v = 177246147.891

then I complete the QGIS transformation matrix

 -0.279 -2.634 13657434.35
48.227 158.434 177246147.891

But what happens is not a translation and it looks like this enter image description here

What am I doing wrong?

Is it because my transformation does not include rotation?

Ideas about how can I solve this problem?

0

I found a solution. I understood that what I need is just a translation, I don't need to rescale or rotate the shapefile. Therefore, instead of using the whole matrix of the affine transformation plugin (which continues to give incorrect results) I just took the coordinates of one point in the original (wrong) shapefile, (396460.52513,4992655.01317) then I took the coordinates for the same point in the target shapefile (396374.45124,4992446.61507) and i calculated the difference (x:-86,07389 y: -208,3981). I then used the transformation matrix of Affine Transformation filling 1 0 and the last column with my "difference of coordinates": 1 0 -86,07389 0 1 -208,3981 And it works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.