Page 1 of 1

bad captureImage

Posted: Tue Oct 16, 2018 5:33 pm
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

Re: bad captureImage

Posted: Tue Oct 16, 2018 7:23 pm
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

Re: bad captureImage

Posted: Wed Oct 17, 2018 3:07 am
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.

Re: bad captureImage

Posted: Wed Oct 17, 2018 11:19 am
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