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

The vectors are not drawn when using projection other than plat-caree. #653

Closed
aashish24 opened this issue Sep 16, 2014 · 16 comments
Closed
Assignees
Labels
Milestone

Comments

@aashish24
Copy link
Contributor

No description provided.

@aashish24 aashish24 added this to the 2.1 milestone Sep 16, 2014
@alliepiper
Copy link
Contributor

Can I get some more details on this issue?

@doutriaux1
Copy link
Contributor

look at vcs_test_basic_vector_-3_proj_SH or any vector test that involves a projection, the continent, labels etc are drawn but no vector.

@aashish24 aashish24 added the Bug label Sep 25, 2014
@aashish24
Copy link
Contributor Author

Will look into it.

@doutriaux1
Copy link
Contributor

i think it is because the glyph location is set via an array, and this array does not go through the projection code.

@alliepiper
Copy link
Contributor

I'm looking into this, and it's difficult to figure out what data is in what coordinate system, what coordinate system it should be in, etc.

I'm using the test command:

python "/ssd/src/uvcdat/testing/vcs/test_vcs_basic_gms.py" "--gm_type=vector" "--projection=-3" "--lat1=-90" "--lat2=0" "--source=/ssd/src/uvcdat-build/uvcdat-testdata/baselines/vcs/test_vcs_basic_vector_-3_proj_SH.png" --show

Prior to calling doWrap on the vector data, the vector data bounds are similar to the final continent bounds (Roughly (-9782112.62778627, 9772957.562484365, -9759498.0, 8568893.0)). After calling doWrap, the vector dataset is empty, as there is no data that lies within the clip box.

If there is a missing projection, where should that projection take place? Should each worker function (plotVector, plot2D, plot[...], etc) take care of projecting the data, or should this be handled somewhere higher up the stack?

I guess what I'm looking for is sort of a high level description of how data comes into vcs (e.g. what coordinate system), and what transformations are expected to take place, what order the transformations should be performed in, and where the transformations are expected to occur.

@doutriaux1
Copy link
Contributor

@dlonie I think you're onto something. doWrap maniuplates the inputData ut in the case of vectors we are not using this we are using some other array. I can we need to update doWrap to also alter the "Vectors array"

@alliepiper alliepiper assigned doutriaux1 and unassigned alliepiper Jan 29, 2015
@alliepiper
Copy link
Contributor

I'll reassign this as it's a VCS issue, and you have a better understanding of what that code should be doing ;)

@doutriaux1 doutriaux1 modified the milestones: 2.1, 2.2 Feb 2, 2015
@doutriaux1
Copy link
Contributor

@dlonie taking out doWrap does make any diff the bounds are big as soon as I do the geo (projection). The numbers are probably ok too, they are in m on the earth sphere. I just think the fitToViewPort might be the issue here. Not sure. Although I think the issue is with the glyph and the associatedArray (vector). Anyhow I think we need to get together on this one. Won't be fixed for 2.2 that's for sure. Moving milestone

@doutriaux1 doutriaux1 modified the milestones: 2.3, 2.2 Mar 5, 2015
@doutriaux1
Copy link
Contributor

when fixing this we should turn back on vector tests for projections

@doutriaux1
Copy link
Contributor

@aashish24 @dlonie is one f you taking a look at this?

@doutriaux1 doutriaux1 assigned aashish24 and unassigned doutriaux1 Aug 31, 2015
@alliepiper
Copy link
Contributor

@doutriaux1 I haven't looked at it since it was reassigned.

@doutriaux1
Copy link
Contributor

import vcs
import os
import cdsm2
f=cdms2.open(os.path.join(vcs.sample_data,"clt.nc"))
u=f("u")
v=f("v")
x=vcs.init()
V=x.createvector()
p=x.createprojection()
p.type="polar"
V.projection=p
x.plot(u,v,V)

@aashish24
Copy link
Contributor Author

I am getting close in solving the mystery..

vector

@doutriaux1
Copy link
Contributor

Nice!

@aashish24
Copy link
Contributor Author

Still some more work to do but here is the latest image:

vectors

  • Need to fix doWrap
  • Fix failing tests
  • Add notes and squash commits

@aashish24
Copy link
Contributor Author

Also, I think I may have found a bug in vtkGeoTransform. Will confirm it on Monday, since I am having a hard time to believe that we had this bug all along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants