[Xastir] Ridge Radar images

Tom Russo russo at bogodyn.org
Fri Dec 25 12:35:19 EST 2009


On Fri, Dec 25, 2009 at 12:03:08PM -0500, we recorded a bogon-computron collision of the <rtg at aapsc.com> flavor, containing:
>    So my calculations  are still off.  I need help after all.  Is maybe the 
> 'map units' referred to in line1 and line4, NOT decimal degrees?  If not, 
> what are they, and how do I calculate a second tiepoint from them?

The format of the worldfile and the meanings are as you describe them.  
Technically,  the worldfile is the 6 parameters of the "affine transformation"
from pixel coordinates to map coordinates (in this case, map coordinates are
lat/lon).

So I don't see anything immediately and obviously wrong at a fundamental
level with how you're going about it.  There might be a small aritmetic error,
but that would be it.

I think this is wrong:
> Longitude = line5 - (line1 * 600) Latitude = line6 + (line4 * 550)

it should be, I think:

Longitude = line5 + (line1 * 599) Latitude = line6 + (line4 * 549)

That's because the affine transformation would be, normally (preserving the
sign of all the lines):

worldcoordinate1(pixelx,pixely) = line1*pixelx+line2*pixely+line5
worldcoordinate2(pixelx,pixely) = line3*pixelx+line4*pixely+line6

The world coordinates of pixel (0,0) should be (line5,line6),
and you're trying to compute the coordinates of pixel (599,549).

I think you did mostly the right calculation even though you reported the sign
wrong in the Longitude expression, but you used 600,550 as the lower-right
pixel value wheras you're tying it to pixel 599,549 (correctly) in the 
geo file.  That would, if I'm not mistaken, be stretching your image slightly
along the diagonal, shifting everything to the southeast.   Try changing the 
lower right tiepoint to -80.540772, 40.013450 and see if it's any better.

Ideally, Xastir should have a means of using the worldfiles directly, instead
of using the custom geo file technique --- but that's more coding for somebody.

I would not be surprised to see an ellipse instead of a circle --- Xastir's
coordinate system is known as the "Platte Carre" or "Equidistant Cylindrical"
projection --- this distorts the real world, and the distortion is of just
the form you're seeing.  According to "An Album of Map Projections (USGS 
Professional Paper 1453), page 22, regarding the distortion:

   Infinitessimally small circles of equal size on the globe (indicatrices)
   are ellipses except along the equator, where they remain circles.  Areas of
   the ellipses also vary.  Ths, there is distortion of both shape and area.

HTH,
T.

> On Fri, 25 Dec 2009, Rick Green wrote:
> 
> >
> > 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.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
  In some cultures what I do would be considered normal. 
                                  -- Ineffective daily affirmation 




More information about the Xastir mailing list