[Xastir-Dev] New geo file tags
Chris Bell
cbell at junknet.com
Wed Sep 3 03:52:37 EDT 2003
To go along with Gerry Creager's wonderful new image, here is some code to
make it prettier, along with the other regular NWS radar images.
Two new tags for the geo files:
TRANSPARENT and CROP
Transparent is a first cut at adding transparencies to images on the
fly, it needs to be enhanced to allow a list of colors to zap. Right
now, setting it to "1" will zap the black background in the NWS and
Gerry's radar images. (hard coded in the source)
Crop defines a set of border pixels to chop off (actually make
transparent). It will be recoded soon to make it more efficient, as
part of my projection project. So, to use it, just define the
(x1,y1,x2,y2=left,top,right,bottom) values to cut off. [(0,0) is
upper left.] For example, if I had an image of 100x100 pixels, and I
wanted to take off 10 pixels off each border, I would use
CROP 10 10 90 90
This does not affect the tie point georeferencing.
For the regular NWS radar images that are 620x620 pixels with the
description text at the top and bottom, and the color index on the
left, I am using:
PROJECTION TM
REFRESH 300
TRANSPARENT 1
CROP 35 20 616 600
(and removing the "NEGATE 200") The projection is not right, but it is
better than without it. My modified geo file for Gerry's image:
--------------------
#US Composite Radar image (Unidata/LDM/Gempak) n5jxs 2003 08 25
URL http://page4.tamu.edu/images/01_USrad.png
# X Y Long Lat
TIEPOINT 200 200 -123.00000 48.00000
TIEPOINT 5800 2300 -67.00000 27.00000
IMAGESIZE 6000 2500
REFRESH 720
TRANSPARENT 1
--------------------
I was having trouble with the ftp URL as well, so switched to the
http, works great!
[Gerry, what is the projection of your composite? I will soon have
proj4 support, so we can handle anything... :) ]
Have fun!!!!!
Chris.
KD6ZWR
cbell at junknet.com
More information about the Xastir-dev
mailing list