[dev] weather code

Rick Emery rick at emery.homelinux.net
Mon Jan 19 16:09:21 PST 2004


Quoting Chuck Hagenbuch <chuck at horde.org>:

> 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."

I've downloaded it, and will try to look at it soon (I've got a release deadline
looming at work in two weeks).

The current METAR block shows the user a drop-down list of countries. After the
country is selected, the user is shown a list of locations within that country. 
It seems pretty straight-forward now; the user will most likely know the location
he/she wants to see the weather for, but may not necessarily know the zip code (if
I wanted to display a block for Boston, Mass., I could find it in the location
list, but have no idea what the zip code is).

Anyway, I'll take a look at what's here. I'd hate to waste all of the work that
must have gone into it :-)

Thanks,
Rick

--
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
 with your eyes turned skyward, for there you have been, and there
 you will always long to return"
                                              -- Leonardo Da Vinci



More information about the dev mailing list