[Xastir] Ridge Radar images

Rick Green rtg at aapsc.com
Fri Dec 25 11:49:49 EST 2009


  I, too have sorely missed the WMSRadar images, so I was excited to see 
the link to the RIDGE data discussed here a week or so ago.
   I dove in and re-read README.maps, as well as the web pages referenced 
in that thread.  I created the following .geo file for the Detroit RIDGE 
radar, placed it in my maps directory, reindexed all maps, and selected it 
in the map chooser.  No joy, I see no radar data displayed.

   So I began to compose this email to ask for some help.  In the process, 
I retraced the steps I took, so I could document them, and discovered the 
arithmetic error in my latitude calculation.  Doh!

Since I'd already typed in my step-by-step, I decided to send this email 
anyway, not as a request for help, but as a HOWTO and example for others.


Each of the RIDGE radar image has a "world file" associated with it. A 
world file is an ASCII text file associated with an image and contains the 
following lines:
Line 1: x-dimension of a pixel in map units
Line 2: rotation parameter
Line 3: rotation parameter
Line 4: NEGATIVE of y-dimension of a pixel in map units
Line 5: x-coordinate of center of upper left pixel
Line 6: y-coordinate of center of upper left pixel

Here's the .gfw file I found corresponding to the image I selected:

0.00978707053444604
0.000000
0.000000
-0.00978707053444604
-86.4032277471369
45.3865516246449

I downloaded the .gif file, saved it, and used gwenview to open it and 
examine its properties, to learn its size, from that, I generated the 
IMAGESIZE line.
the first TIEPOINT line is generated directly from lines 5 & 6 of the .gfw 
file.
The second TIEPOINT line was generated by multiplying lines 1 and 4 by the 
corresponding size parameter, and subtracting from corresponding line 5 or 
6 value.

Longitude = line5 - (line1 * 600) 
Latitude = line6 + (line4 * 550)

Here's the complete geo I generated:

#RidgeDTX.geo
# Base reflectivity from Detroit (white Lake) RIDGE radar
#Label		X	Y	Long		Lat
URL	http://radar.weather.gov/ridge/RadarImg/N0R/DTX_N0R_0.gif
TIEPOINT	0	0	-86.40322	45.38655 
TIEPOINT	599	549	-80.53098	40.00366
IMAGESIZE	600	550 
REFRESH 120
TRANSPARENT 0x0

I placed this above TIGERMAP.geo, and below WORLDHI.map, and I now have a 
radar image overalyed on my xastir display.


  -- Rick Green

"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety."
                                   -Benjamin Franklin

"As for our common defense, we reject as false the choice between our
safety and our ideals."
                                -President Barack Obama 20 Jan 2009



More information about the Xastir mailing list