#!/bin/rc
# genlat > stationlat
fn lat {
desc=`{hget http://radar.weather.gov/ridge/RadarImg/N0R/$1^_N0R_0.gfw|tr -d '
'}
# xy=`{hget http://radar.weather.gov/ridge/RadarImg/N0R/$1^_N0R_0.gif|gif -9t|6.imgsize}
xy=(600 550)
pixsz = ($desc(1) $desc(4))
origin = ($desc(5) $desc(6))
echo -n $1^' '
{
echo 'x=' $origin(1) + $pixsz(1) '*' $xy(1) / 2
echo 'y=' $origin(2) + $pixsz(2) '*' $xy(2) / 2
echo print y, x, "\n"
} | hoc
}
if(! ~ $#* 0){
for(i in *)
lat $i
}
if not
for(i in `{</lib/radar/stations awk '{print $1}'})
lat $i
|