Page 1 of 1

bad captureImage

Posted: Tue Oct 16, 2018 5:33 pm
by joleenf

This sequence:

Code: Select all

data = loadGrid('/Users/joleenf/', field='CMI')

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


ir_min, ir_max = getMinMax(data)

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

panel[0].setCenter(latitude, longitude)

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

Causes either a failure of 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.


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.


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.