-
Notifications
You must be signed in to change notification settings - Fork 50
Refactor of Transformation Definitions in constants, add reverse transformations #133
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
Conversation
…ing of variables in other modules and tests Signed-off-by: SGV-Geodesy <56060078+SGV-Geodesy@users.noreply.github.com>
geodepy/tests/test_transform.py
Outdated
| mga94_to_mga2020, | ||
| mga2020_to_mga94) | ||
| from geodepy.constants import itrf14togda20, gda94_to_gda2020 | ||
| from geodepy.constants import itrf2014_to_gda2020, gda1994_to_gda2020 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it best use stick with common usage. So, GDA94 but GDA2020. Similarly, the ITRF versions pre-2000 have only two digit years (ITRF92), while those from 2000 on have four digits (ITRF2014).
geodepy/transform.py
Outdated
|
|
||
|
|
||
| def atrf2014_to_gda2020(x, y, z, epoch_from, vcv=None): | ||
| def conform_atrf2014_to_gda2020(x, y, z, epoch_from, vcv=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transform_atrf2014_to_gda2020 may be a clearer function name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harry093 good idea, I've also extended this to add transform_ prefix to all datum-to-datum functions in the transform module for clarity
harry093
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BatchelorJ thanks for this. I am open to being convinced otherwise, but I think we should follow the standard names - as frustrating as they are. See my comment in test_transform.py
Thanks @harry093, I thought I'd throw this code up to see what we thought about it so thanks for the feedback. I'm happy to stick to the rule of years <2000 using 2-digit suffixes while >=2000 using 4-digit suffixes as long as it's consistently applied. Most in the geodetic and survey community understand this convention so we should be able to get away with it. |
…datum-specific transformation functions with transform_ prefix Signed-off-by: SGV-Geodesy <56060078+SGV-Geodesy@users.noreply.github.com>
geodepy/constants.py
Outdated
| sc=-1.854, | ||
| rx=0.008, ry=-0.557, rz=-0.178) | ||
|
|
||
| gda19_to_itrf2008 = -itrf2008_to_gda94 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be gda94_to_itrf2008? Same typo made below as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harry093 well spotted! All fixed up in latest commit
harry093
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BatchelorJ looks great mate. I think there's a small typo in the constants module and once that's fixed we are good to merge
Signed-off-by: SGV-Geodesy <56060078+SGV-Geodesy@users.noreply.github.com>
harry093
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BatchelorJ all good! Thanks
This PR standardizes the naming of transformation definitions in the constants module (resolves #129) and adds reverse transformations utilizing the same naming convention (resolves #127). Several other modules and tests that use some of these transformation objects have been refactored, and the names of functions that convert GDA2020 <-> ATRF2014 have been changed so that they have different names to the transformation objects themselves.