From: Dan Diebolt Date: 2005-12-14T03:29:01+09:00 Subject: Re: US Zipcode API for Ruby? --0-533268413-1134498534=:63921 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit >The only thing remaining is an efficient algorithm for a search for all zipcodes within a given radius. http://www.4guysfromrolla.com/webtech/040100-1.shtml ' THIS VARIABLE SETS THE RADIUS IN MILES iRadius = 150 LatRange = iradius / ((6076 / 5280) * 60) LongRange = iRadius / (((cos(cdbl(iStartLat * _ 3.141592653589 / 180)) * 6076.) / 5280.) * 60) LowLatitude = istartlat - LatRange HighLatitude = istartlat + LatRange LowLongitude = istartlong - LongRange HighLongitude = istartlong + LongRange --------------------------------- Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping --0-533268413-1134498534=:63921--