Re: Zip code
- From: Philip Ronan <invalid@xxxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 19:24:54 +0100
"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/
.
- Follow-Ups:
- Re: Zip code
- From: News
- Re: Zip code
- References:
- Zip code
- From: News
- Re: Zip code
- From: Philip Ronan
- Re: Zip code
- From: News
- Zip code
- Prev by Date: Re: Zip code
- Next by Date: Re: Question on best practice for allowing edits of lists
- Previous by thread: Re: Zip code
- Next by thread: Re: Zip code
- Index(es):