-
Notifications
You must be signed in to change notification settings - Fork 68
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
Handle mercator infinity projection at 90,-90 #1552
Conversation
Ref #1552 |
130 or so failures! Wow congrats @aashish24 😉 |
LGTM merging. 😉 |
Goes with CDAT/uvcdat-testdata#64 |
@doutriaux1 yes, we should make a rule to merge only those branches that can bring atleast 100+ test failures -:). Ready for review. One thing I noted (which I am not sure if caused by my branch), is that the text in the rendered plot overlaps slightly with the visualization. I am not sure if that is something related. |
@@ -94,11 +94,27 @@ def putMaskOnVTKGrid(data, grid, actorColor=None, cellData=True, deep=True): | |||
grid.GetPointData().AddArray(ghost) | |||
return mapper | |||
|
|||
def handleProjectionEdgeCases(projName, data): | |||
# For mercator projection, latitude values of -90 or 90 | |||
# transformation result in infinity values. We chose -85, 85 |
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.
Technically, 85.051129 is used because that makes the domain a square in projected coordinates.
https://en.wikipedia.org/wiki/Web_Mercator#Formulas
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.
@jbeezley sure, but matplotlib uses 85.0 and so as some other tools. For UV-CDAT since we scale the plot, which makes it a rectangle anyways but I am willing to change it to 85.051129 if that is preferred.
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.
No 85.0 is close enough for any practical purpose, I was just pointing out that it isn't a magic number chosen arbitrarily. It is derived for a reason.
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.
sure, yup, I knew -:) but you are right not everyone would know. On a related note, matplotlib has a threshold option as well that I would like to add at some point.
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.
On this, I would like to propose that VCS do not scale the viewport but that's something I need to bring up in some meeting. The idea is to fill the screen but to me anytime you use a projection, it really comes out distorted.
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.
👍 The aspect ratio of the projection should always be 1:1.
c7961f7
to
a0166fe
Compare
Ref: #587 |
a0166fe
to
8bd47f6
Compare
@doutriaux1 some of tests are failing because of the bad testdata branch. I repushed it. |
@aashish24 one test failed and no flake8. |
@aashish24 I'm fixing annie should be able to run the build soon after is merged #1551 |
@doutriaux1 all of the tests should pass now. |
@doutriaux1 ready to be merged.. all tests are passing. |
@doutriaux1 looks like RH6 is not pulling the right branch for test-data |
@aashish24 I wonder if ctest forces it back to master branch? I will take a look. The history show a successful switch to fix_mercator branch. |
@doutriaux1 I am going to merge this branch soon since all of the tests are passing now. |
Please keep it open I will merge it. I need to figure out why the bots don't check the correct branch |
@aashish24 seems like my bots are out of sync with the master branch, going to update them and retrigger the builds. Please hold on. |
@doutriaux1 ping!! |
let me try locallly |
@aashish24 I get a slight diff on my ubuntu: https://open.cdash.org/viewTest.php?onlyfailed&buildid=4017404 |
x = vcs.init() | ||
iso = x.createisofill() | ||
iso.projection = "mercator" | ||
x.plot(s(latitude=(-90, 90)), iso) |
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.
@aashish24 please use setbgdimension and plot in bg=1
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 suspect the slight diff on my ubunutu maybe due to default size being to small.
@doutriaux1 I have pushed changes as suggested. I may have to upload a new baseline as well. |
@aashish24 thanks |
@doutriaux1 ready for your review. |
I don't understand why the bots do not check the correct uvcdat-testdata, running the command locally works... |
Handle mercator infinity projection at 90,-90 ##bot##skip-commit
@doutriaux1 maybe get the |
Not ready for review yet.. just wanted to push for buildbot.