bad captureImage

Errors and unexpected results
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

bad captureImage

Post by joleenf »

Hi,

This sequence:

Code: Select all


data = loadGrid('/Users/joleenf/CG_ABI-L2-CMIPM1-M3C13_G16_s20182822359280_e20182822359350_c20182830001296.nc', field='CMI')

panel = buildWindow(height=2160, width=1920)

latitude=26.59
scale=2.0
longitude=86.49

ir_min, ir_max = getMinMax(data)

layer=panel[0].createLayer('Image Display', data)

panel[0].setProjection(layer)
panel[0].setCenter(latitude, longitude)
panel[0].setScaleFactor(scale)

panel[0].captureImage('/Users/joleenf/data/meso1.png', createDirectories=True)


Causes either a failure of
javax.media.j3d.BadTransformException: TransformGroup: non-affine transform

or no message at all, but no image either...

The problem (I think) is that the longitude value is not in the projection. This is causing a problem with setCenter, but the code proceeds forward to the captureImage portion. Even though the image cannot and does not re-center, it seems that the image cannot be captured once this error occurs. Consequently, the image capture hangs.

Joleen
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: bad captureImage

Post by bobc »

Hi Joleen,

Thanks for reporting this, I'm replicating the problem. This looks to be the same bug as Inquiry 2478. I added a note to the inquiry that you ran into the bug again and I added a link to this forum post.

If I come up with a workaround for this, I'll let you know.

Thanks,
Bob
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: bad captureImage

Post by ghansham »

I think either we can fix setCentetLatLon method
by giving appropriate warning or a debug msg and not
keeping the image as it is without doing paning if center
lat/lon is not in the image. That makes some sense, I hope.
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: bad captureImage

Post by bobc »

Hi Ghansham,

Yes, that makes sense and sounds like a reasonable way to solve the problem. I’ve added a note to the inquiry with your suggestion.

Thanks,
Bob
Post Reply