this is something very similar to what we are attempting to accomplish:
----- Original Message -----
From: "Chris W" <2wsxdr5@stripped>
To: "Mike Blezien" <mickalo@stripped>; "MYSQL General List"
Sent: Sunday, August 20, 2006 8:59 PM
Subject: Re: Calculation distances
> Mike Blezien wrote:
>> we are working on a small project which needs to calculate the closest
>> from an address and/or zipcode entered into a search box. It will read from a
>> MySQL database of companies, which store their address and zipcodes.
>> looking for the best way to approach this. I've seen some zipcode Perl
>> modules on
>> Cpan, but nothing for helping calculation distances. Can someone point me in
>> right direction to accomplish this ... thx's :)
> The zip code tables usually give a lat long location somewhere near the center
> of that zip code (which can be HUGE in rural areas) You can then use some math
> that with give you the distance between the coordinates of 2 zip codes. Here
> is a web site I found for help when doing similar calculations. Remember that
> this type of math usually wants angle measurements in radians, not degrees.
> Chris W
> Gift Giving Made Easy
> Get the gifts you want & give the gifts they want
> One stop wish list for any gift, from anywhere, for any occasion!