Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helmert: consider that xyzt.t == HUGE_VAL means t_epoch #1065

Merged
merged 1 commit into from Jul 7, 2018

Conversation

@rouault
Copy link
Member

@rouault rouault commented Jun 28, 2018

Currently when doing

echo "2 49 0" | src/cct  +proj=pipeline +ellps=GRS80 +step +proj=cart +step +proj=helmert +x=10 +y=3 +z=1

we get as a result:

         -nan           -nan          -nan           inf

This is due to cct initializing the xyzt.t to HUGE_VAL

Currently when doing
echo "2 49 0" | src/cct  +proj=pipeline +ellps=GRS80 +step +proj=cart +step +proj=helmert +x=10 +y=3 +z=1

we get as a result:
         -nan           -nan          -nan           inf

This is due to cct initializing the xyzt.t to HUGE_VAL
@rouault
Copy link
Member Author

@rouault rouault commented Jun 29, 2018

Actually digging more, the particular case is needed since in update_parameters() we multiply the differencial values by dt. But when those differencial values are 0 and dt == HUGE_VAL, the multiplication of both result in a NaN.

@kbevers
Copy link
Member

@kbevers kbevers commented Jul 2, 2018

I think this looks alright. There's a grey area when doing something like echo 1 2 3 | cct +proj=helmert +x=10 +dx=. Here a t-coordinate is necessary to do the transformation correctly but not supplying it will default to the time-invariant version of the Helmert.
Perhaps it would be better to fail in those cases. Which was probably my intention with the way the code was written initially (although not considering all cases of possible "bad" input data).

@rouault rouault merged commit aad7ff1 into OSGeo:master Jul 7, 2018
4 checks passed
@kbevers kbevers added this to the 5.2.0 milestone Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants