-
Notifications
You must be signed in to change notification settings - Fork 344
feat: add ob_tran projection #531
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
ahocevar
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.
You mentioned failing tests or unexpected values. Can you please clarify? We don't want to test for incorrect values, so if you modified expected test values to make the tests pass, we should talk about it and make sure we use the same expected values as other libraries.
I did not include any tests where the test values are not what they should be (e.g. forcing the tests to past). However, I don't have any tests for when Doing some more testing now, seems like I've added a couple more tests including one that should be failing. That's where the problem is. I've just modified the code to pass the entire proj4 string to the inner projection, per the original source code. This has not resolved the problem with Neither this code nor the PROJ source code touches |
|
@ahocevar Okay, I have it sorted out now. It seems there is a subtle difference in how PROJ handles I also adjusted the param parsing to match the original source (order of preference for which transform method), and added a bunch of tests around param parsing. Here are the tests that have been added, testing against the same string and coordinates in PROJ:
Let me know any further changes! |
ahocevar
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.
Thanks for your continued effort on this, @potion-cellar. Although this implementation is strictly bound to proj strings, without support for WKT or projjson, I'm going to accept and merge this. If someone needs support for this with WKT or projjson, that can be handled in a separate pull request.
Resolves #371
Resolves #331
Note:
Maybe not the best way to do the inner forward/inverse -- was difficult to get the inner projection to
init()properly (i.e. passing the params correctly) and couldn't find any working examples of such in the code.Also noted that some projections did not have default values set for some params (despite what the docs say), causing reprojection tests to fail unless
init()was modified to set these default params. Could maybe split that off into a separate branch.Fixed in later commits, text below is no longer relevant:
Tests verify that
+x_0and+y_0are being passed forward successfully.+Rand+lon_0are also being passed forward but they seem to result in a major divergence of expected coordinates, or at least+lon_0does. I verified the inner projection was receiving the correct value for this, so not sure if it's a bug with the inner projections or what.