diff options
| author | Even Rouault <even.rouault@mines-paris.org> | 2018-07-07 15:38:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-07 15:38:46 +0200 |
| commit | aad7ff1cc6e6b0e1734601ca397e88d97a101499 (patch) | |
| tree | 63a78b11288d6192fe472ca5f44746df8c4c8a2e | |
| parent | d9fac5f2b865d576dc484ef1564381ce2f171fc1 (diff) | |
| parent | 31c6914941ae05a0206647fac232108cab86dbef (diff) | |
| download | PROJ-aad7ff1cc6e6b0e1734601ca397e88d97a101499.tar.gz PROJ-aad7ff1cc6e6b0e1734601ca397e88d97a101499.zip | |
Merge pull request #1065 from rouault/helmert_with_t_huge_val
Helmert: consider that xyzt.t == HUGE_VAL means t_epoch
| -rw-r--r-- | src/PJ_helmert.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/PJ_helmert.c b/src/PJ_helmert.c index 8ba955bb..490bc2c4 100644 --- a/src/PJ_helmert.c +++ b/src/PJ_helmert.c @@ -431,8 +431,9 @@ static PJ_COORD helmert_forward_4d (PJ_COORD point, PJ *P) { /* We only need to rebuild the rotation matrix if the * observation time is different from the last call */ - if (point.xyzt.t != Q->t_obs) { - Q->t_obs = point.xyzt.t; + double t_obs = (point.xyzt.t == HUGE_VAL) ? Q->t_epoch : point.xyzt.t; + if (t_obs != Q->t_obs) { + Q->t_obs = t_obs; update_parameters(P); build_rot_matrix(P); } @@ -448,8 +449,9 @@ static PJ_COORD helmert_reverse_4d (PJ_COORD point, PJ *P) { /* We only need to rebuild the rotation matrix if the * observation time is different from the last call */ - if (point.xyzt.t != Q->t_obs) { - Q->t_obs = point.xyzt.t; + double t_obs = (point.xyzt.t == HUGE_VAL) ? Q->t_epoch : point.xyzt.t; + if (t_obs != Q->t_obs) { + Q->t_obs = t_obs; update_parameters(P); build_rot_matrix(P); } |
