diff options
| author | PROJ-BOT <59655370+PROJ-BOT@users.noreply.github.com> | 2020-08-21 09:39:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-21 09:39:28 +0200 |
| commit | db42199815c9093dbdf579702268ed3424e5c89f (patch) | |
| tree | 7287bd939459d1d496502131a5238bfce383244c /src/transformations | |
| parent | 72ca69a5d963b39e3fb73b1754ea3391bef21762 (diff) | |
| download | PROJ-db42199815c9093dbdf579702268ed3424e5c89f.tar.gz PROJ-db42199815c9093dbdf579702268ed3424e5c89f.zip | |
Helmert: fix regression when rotation terms are 0, but scale is not (#2336)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/transformations')
| -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); |
