Hi,
The display centering and scale has been explained to me before, but I can't remember how it works. How do I find out the exact center and scale of an active display, so that I can replicate it my script?
I tried this:
1.) Open McIDAS-V, translate and zoom the display without changing the projection.
2.) Open the shell and type:
Code: Select all
print activeDisplay().getScreenCenter()
3.) Get the display scale from
View-->Properties-->Aspect Ratio (Scale X). See image below, the top Properties listing is for the original window. In this case, ScaleX was 1.29694.) Create a new window using panel=buildWindow()
5.) Type panel[0].setCenter(<lat from getScreenCenter>,<lon from screen center>, scale=<scale from ScaleX>).
Please see image below for the sequence. The created panel does not reproduce the view in the original window, nor does the scale reflect the value entered (Result is 0.6484, not 1.2969).
This has consistently confused me.
It is also confusing that repeating the panel[0].getScreenCenter does not reproduce the entered values for setCenter. I theorized that it was the order that mattered. Since I had zoomed before I translated, I chose to do another test where setScaleFactor is used first, then setCenter without a scale. This still did not reproduced the entered value for the center lat/lon. This also did not reproduced the entered scale for the scaleFactor.
Thanks,
Joleen