remap in script

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

remap in script

Post by joleenf »

Hi,

I was trying to make a google earth image. I realized that it would be best to change to a different projection before saving my image in a script. So far I have tried the commands:

local_data="/Users.../AREA0100"
a=load(local_data)
dc=createDisplay('imagedisplay',a)
vms=idv.getVMManager().getViewManagers()
new_proj=vms.get(0).setProjectionByName('US>States>Midwest>Wisconsin')

Now how do I apply it?

Thanks,
Joleen

Note: I tried this again and the above method is not working either. :(
User avatar
tdrink
Posts: 157
Joined: Wed Apr 15, 2009 7:45 pm

Re: remap in script

Post by tdrink »

The only thing I can suggest is that you haven't accessed the correct
Display? You're assuming it's the first in the list, maybe there's more
than one. Obviously, we need some better modules for doing this.
You shouldn't really have to do: getIDV.getVMManager.get yada, yada
yada.

Do you see the projection in the Display change after you set? Check
all of the Displays in the session.

Tom
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: remap in script

Post by joleenf »

Tom,

You are correct, I did have more than one display and was pointing to the wrong display.
Thanks, the method above does work. However, instead of new_proj=vms.get(0).setProjectionByName('US>CONUS'), do not make a variable.... just use

vms.get(0).setProjectionByName('US>CONUS').

Joleen
Post Reply