in reply to Re^2: Radar and Goo::Canvas
in thread Radar and Goo::Canvas

Yes!! I'm looking to add a WSR-88D (doppler radar) overlay to the application. Most radar data is in spherical coordinates which can be hard to transfer to gridded (lat lon) coordinates, but it is possible. The best thing I can think of to do is to overlay an image, such as a png, over the top of the application field. Is there a way to set a color in goo::canvas that will be invisible?

Replies are listed 'Best First'.
Re^4: Radar and Goo::Canvas
by zentara (Cardinal) on Jun 30, 2008 at 18:21 UTC
    Is there a way to set a color in goo::canvas that will be invisible?

    There are 2 different things you are talking about. An item (like a rectangle) will be transparent if you don't fill it with a color. But for an image, the transparency is set in the image. Look at the demo, and the torroid..... the edges and center are transparent because the torroid.png was created with black as transparent.

    So.... you will need to figure out what is the color of the background of the doppler overlay, and make it transparent. I don't know offhand if the Gtk2 will change transparency of an image (it probably does but the docs don't make it obvious) , or you can use ImageMagick, GD, or Imager to set the transparent color.

    You might want to ask this on the Perl/Gtk2 maillist. The Gtk2::Image can be loaded with a mask, but I don't have an example. The odds are you will either be setting white or black to be transparent, and I would guess the doppler image would already be setup for transparency. Have you tried to overlay the doppler image onto the geotiff yet? It may just work right out of the box. If you google for "gtk2 image transparent mask" you will find some php code you can adapt to Perl, that shows how to load an image with a transparency mask.


    I'm not really a human, but I play one on earth CandyGram for Mongo
      This may be a weird question but...
      are there any modules out there for visualizing numerical data?
        That's a big question. It depends on what you mean by visualize, and numerical data. I can visualize two, by this -> 2. :-) It probably should be posted as another new node with more details of what you need.

        I'm not really a human, but I play one on earth CandyGram for Mongo