[Xastir-Dev] NWS Radar Images

Curt Mills, WE7U hacker at tc.fluke.com
Tue Dec 31 13:51:50 EST 2002


On 30 Dec 2002, Gerry Wheeler wrote:

> I was looking at the GIF images for the NWS radar, and I found something
> interesting. I'm wondering if Xastir has enough features to take
> advantage of it...
>
> The radar GIFs use a color pallette (as do all GIFs, I think), so each
> point in the image specifies a pallette index from 0 to 255, and that
> place in the pallette specifies the color.
>
> The adornments in the image, such as state lines, highways, labels,
> etc., each use a unique pallette index. So, if the pallette is modified
> to make the appropriate positions specify the color "black", all the
> adornments disappear. The result is an image that contains only the
> radar data, without extra stuff.

Or we could snag just the XX colors of pixels out of the original
image and write them to Xastir's pixmap.  Might be quicker than
modifying the original image and then writing it on top of Xastir,
then again, may not be.


> I was looking at the code in maps.c that loads images based on .geo
> files, and I see there are numerous options that Xastir will feed to
> Image Magick to make conversions to the image. However, I don't know
> what they all do -- is there something that can be used to modify the
> image pallette?

Not sure.  Have to talk to the guy who did the imagemagick
integration.  He may/may not know.  Olivier may know as well.


> Another thing that might be done (or maybe already has been done) is to
> have Xastir treat the black parts of the image as transparent, so then
> the radar data could be drawn on top of other images. I seem to recall
> that there's a way in a GIF image to specify that one of the colors
> should be treated as transparent, so maybe that could be used.

I don't think Xastir currently handles transparency though.


> And finally (is this enough yet?), is there a way to tell Xastir to crop
> the image? It would be nice to remove the left edge where the scale is
> drawn.

These are all good ideas.  The last one I had myself just recently
(last week).  I was going to work on that at some point.  It's cool
selecting the directory that contains all of the radar .geo files,
then watching all of the radar maps for the whole country get
loaded.  It'd be cooler if the images could be cropped on the
left/top/bottom, and even cooler if the black could be made
transparent as you said.

Create a feature request for all of this stuff so it doesn't get
forgotten.

-- 
Curt Mills, WE7U                    hacker_NO_SPAM_ at tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto:    A tax on people who are bad at math!"
"Windows:  Microsoft's tax on computer illiterates!" -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir-dev mailing list