On Jun 20, 2010, at 8:39 AM, Curt, WE7U wrote:

> I seem to remember somebody making a bunch of .geo's available for
> the RIDGE data at some point.  

I also wrote a perl script that produces a geo for a RIDGE radar given the 
radar ID.  I think I posted it to the Xastir list at some point in time, but 
I'm attaching it here for fun and games.

> -- 
> Curt, WE7U.                         <http://www.eskimo.com/~archer>

--
Jeremy McDermond (NH6Z)
Xenotropic Systems
[email protected]

#!/usr/bin/perl

use strict;
use LWP::UserAgent;
use Image::Size;

my $station = uc($ARGV[0]);

my $gif_url = 'http://radar.weather.gov/ridge/RadarImg/N0R/' . $station . 
'_N0R_0.gif';

my $response = LWP::UserAgent->new->request(
  HTTP::Request->new( GET => $gif_url )
);

unless($response->is_success) {
  die "Couldn't get radar image: ", $response->status_line, "\n";
}

my ($img_x, $img_y) = imgsize(\$response->content);

my $response = LWP::UserAgent->new->request(
  HTTP::Request->new( GET => 'http://radar.weather.gov/ridge/RadarImg/N0R/' . 
$station . '_N0R_0.gfw' )
);

unless($response->is_success) {
  die "Couldn't get radar descriptor: ", $response->status_line, "\n";
}

my ( $yscale, undef, undef, $xscale, $lon, $lat ) = split(/\r\n/, 
$response->content);

my $tiepoint_lat = $lat - ($yscale * $img_y);
my $tiepoint_lon = $lon - ($xscale * $img_x);

print "URL\t\t$gif_url\n";
print "TIEPOINT\t0\t0\t$lon\t$lat\n";
print "TIEPOINT\t$img_x\t$img_y\t$tiepoint_lon\t$tiepoint_lat\n";
print "IMAGESIZE\t$img_x\t$img_y\n";
print "REFRESH\t\t60\n";
print "TRANSPARENT\t0x0\n";
print "PROJECTION\tLatLon\n";
_______________________________________________
Xastir mailing list
[email protected]
http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir

Reply via email to