diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-08-20 23:06:33 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-08-21 08:45:47 +0200 |
| commit | b104bc7afbf08a5d2e6097276784424d091b3f59 (patch) | |
| tree | d38f41e1c5c4d95581c70f1df256b85ab2bd0f24 /src/transformations/helmert.cpp | |
| parent | bc1dcf2cd581a5c144a9c35028bd33aa9191882f (diff) | |
| download | PROJ-b104bc7afbf08a5d2e6097276784424d091b3f59.tar.gz PROJ-b104bc7afbf08a5d2e6097276784424d091b3f59.zip | |
Helmert: fix regression when rotation terms are 0, but scale is not
Fixes #2333
Was due to 3dc92ad7014e1cf20a3bc95c8c21a34a371fcb78
Doesn't affect released versions
Diffstat (limited to 'src/transformations/helmert.cpp')
| -rw-r--r-- | src/transformations/helmert.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/transformations/helmert.cpp b/src/transformations/helmert.cpp index 9fb568a8..d3857d89 100644 --- a/src/transformations/helmert.cpp +++ b/src/transformations/helmert.cpp @@ -373,7 +373,7 @@ static PJ_XYZ helmert_forward_3d (PJ_LPZ lpz, PJ *P) { return point.xyz; } - if (Q->no_rotation) { + if (Q->no_rotation && Q->scale == 0) { point.xyz.x = lpz.lam + Q->xyz.x; point.xyz.y = lpz.phi + Q->xyz.y; point.xyz.z = lpz.z + Q->xyz.z; @@ -413,7 +413,7 @@ static PJ_LPZ helmert_reverse_3d (PJ_XYZ xyz, PJ *P) { return point.lpz; } - if (Q->no_rotation) { + if (Q->no_rotation && Q->scale == 0) { point.xyz.x = xyz.x - Q->xyz.x; point.xyz.y = xyz.y - Q->xyz.y; point.xyz.z = xyz.z - Q->xyz.z; @@ -678,10 +678,6 @@ PJ *TRANSFORMATION(helmert, 0) { proj_log_trace(P, "ds= %8.5f t_epoch=%8.5f", Q->dscale, Q->t_epoch); } - if (Q->no_rotation) { - return P; - } - update_parameters(P); build_rot_matrix(P); |
