[Xastir-Dev] NWS Radar Images

Gerry Wheeler gwheeler at vmguys.com
Mon Dec 30 19:37:37 EST 2002


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. 

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? 

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. 

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. 
-- 
Gerry Wheeler      KG4NBB
VM Systems, Inc.   +1 239 596 2480 x24
Naples, FL 34109   gwheeler at vmguys.com



More information about the Xastir-dev mailing list