View Single Post
Old 05-01-2009, 06:18 PM   #3 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Village Idiot View Post
I've never done this, so this is just me theorizing. Zip codes do not indicate a location by themselves. You have to have a database that have the zips and their corresponding GPS locations (many are for sale, a free one is available at http://www.census.gov/tiger/tms/gazetteer/zips.txt ). Then using basic algebra, you use the following formula

r^2 <= (x-h)^2 + (y-k)^2

r being your radius, x and y being your testing points and h and k being your zip codes location. If a real number is returned x and y are within your circular radius.

There are probably algorithms to ensure you are only checking ones in the right geographic area.
Thanks VI, I'll check out that link.

So you think GPS is the key huh? If I can whip something up real quick I'll be sure to post it here..
allworknoplay is offline  
Reply With Quote