McIDAS will not plot Drawings or Lat/Long lines from Jython

Errors and unexpected results
Post Reply
User avatar
tim_v
Posts: 22
Joined: Thu Mar 19, 2009 6:26 pm

McIDAS will not plot Drawings or Lat/Long lines from Jython

Post by tim_v »

I have a rather simple bundle consisting of one static satellite image from an ADDE server, a couple of shapefile overlays, a drawing control (free object, and a lat/long grid.

If I start McIDAS and load the bundle manually from File > Open, the drawing objects and lat/long grid display immediately, just the same way as I had saved them. Perfect. However here's where the trouble starts:

* If I call the same bundle at the command line with Jython and use setOffScreen(1), i.e. background process, the lat/long grid and drawing object are always missing.

* If I call the same bundle at the command line with Jython and use setOffScreen(0), i.e. foreground process, the lat/long grid and drawing object plots correctly, but the width= and height= are ignored and the resulting image is a tiny 600x461 default map.

I actually need to use it in setOffScreen(1) mode... I am just posting the other to show the inconsistencies in behavior. I've tested this bundle under different builds including McIDAS-V 1.2/win64, V1.4/win64, and V1.4/win32 (which I am now running) and they all produce identical results. If you're not seeing this I can create a step-by-step.

I have also had serious problems with text scaling to the point that all provisions for text in McIDAS are not usable. If I set text labels in the Drawing object and use the default font and 12pt setting, I get all kinds of arbitrary text scales every time the bundle is loaded. I've attached an extreme example where the 12pt fonts decided they wanted to appear in 200pt. You can also see some "fuzz" behind the text which has been an ongoing problem... I don't know if this intended to be a drop shadow but it makes the text difficult to read and I can't find anywhere to turn it off. I also had similar problems with auto-scaling and text "fuzz" with the Lat Long Labels panel and could not get consistent results. This is not a serious problem as I can do without labels for now and is not really the point of my message, but McIDAS really needs an option to disable text auto-scaling and leave it at a fixed size. This would make these functions usable again.

Thanks,

Tim


____________________________
Command line call:
call runMcV -islfile c:\dat\project\screencapture.py

screencapture.py:
setOffScreen(1)
openBundle("/dat/project/project.mcv",width=1200,height=900)
pause()
writeImage("/dat/project/sat/latest.jpg")
Attachments
temp.jpg
User avatar
tim_v
Posts: 22
Joined: Thu Mar 19, 2009 6:26 pm

Re: McIDAS will not plot Drawings or Lat/Long lines from Jython

Post by tim_v »

Interestingly I found that the Drawing Control crosshairs are actually plotting in the Jython script but appears as specks. So the problem is they've been scaled down tremendously. I changed the scaling up by a factor of 20 and they are appearing now, but lat/long lines are still not plotting.

Tim
User avatar
jayh
Posts: 424
Joined: Thu Jan 15, 2009 10:34 pm

Re: McIDAS will not plot Drawings or Lat/Long lines from Jython

Post by jayh »

Hi Tim-

My colleague and I created a bundle with a shape file and some lat/lon lines, and we were able to replicate some of the behavior you are seeing. It looks like we have a bug when height= and width= are being used. Here is a sample of how we were invoking our script:

setOffScreen(0)
openBundle('/home/mcuser/LatLon.mcvz')
pause()
activeDisplay().captureImage('/home/mcuser/Image.jpg')

This did save the graphics as expected, but when we tried specifying height= or width= in the openBundle step, then the latlon lines were not saved in the jpeg like you experienced. The captureImage step also can use a height= or width= (SaveDisplay Help). Unfortunately we also saw the same behavior of the latlon lines not being saved in the jpeg.

I have written inquiry 1711 for our programmers to fix this bug. We appreciate you reporting this problem. Also, could you post your project.mcv file either to this forum thread or ftp it to us? Using your bundle for testing will also help us diagnose the text size and fuzziness problems you are seeing.

ftp ftp.ssec.wisc.edu
user anonymous
password {e-mail address}
bin
cd pub/incoming
put {file name}

Thanks again for reporting this. If you have any further questions or comments, just let us know.

Thanks, Jay
Post Reply