[dev] weather code

Chuck Hagenbuch chuck at horde.org
Mon Jan 19 08:58:45 PST 2004


A long time ago, I started working on some code to get a METAR station from a
zipcode. No one appeared to have a database of these at the time, so I ended up
finding a great-circle distance algorithm, a database of lat-long values for
zipcodes, and a database of lat-long values for metar weather stations. Given a
zipcode, it'll loop through and find the closest metar station.

Not exactly fast, but if you only need to do it once...

I'm not sure how this can best be used by the current weather blocks, or if it's
useful at all, so I tarred it up and put it here:

http://marina.horde.org/wip/weather.tar.gz

Someone - Rick Emery? :) - should take a look and see if anything in there is
useful. There may be some other random forecast code in the tarball, too.

Let me know if you download it, since the file will disappear eventually...

Enjoy,
-chuck

--
Charles Hagenbuch, <chuck at horde.org>
"Here, I brought some cole slaw. It's made from peeeooople! Just kidding."


More information about the dev mailing list