Re: Zip code



"News" wrote:

> Thanks. While waiting for an answer I did a similar thing to the above on
> my own. All I did was calculate the delta latitude and longitude
> (radius*360/24902) and added and subtracted from the center point. That
> gave the surrounding box. From there I will have not that many zipcodes. I
> can test each one for distance and see if it lies within the specified
> radius. That is the simplest method.

The delta longitude will be a bit different unless you're at the equator.
Off the top of my head, I'd say it's probably (radius*360/(24902*cos(lat))

Rajesh's solution also looks good, BTW.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/


.