List:General Discussion« Previous MessageNext Message »
From:Jeff Kolber Date:April 16 2005 4:27am
Subject:Re: zip code search within x miles
View as plain text  
How are sites doing the search by zip and coming up with results within x
miles?  Is there some OSS zip code download that has been created for this?

I have to do this on a high volume realestate website - we use the
great circle concept to calculate the limits on longitudes and
latitudes to be within distance n. We then select the zip codes within
these limits and join on the zip code to the property info. We also
calculate the distance from the center of the search to the found
property.

As our traffic grew I started storing the longitude and latitude in
radians as well, which relieved the database from doing some math.

I have also seen that we've had to update the database about twice a
year to keep up with the USPS - mainly in terms of which counties are
in which zip codes - which may or may not change more frequently in
the period before an election.

I would be interested, anyone have insights into doing  with Canadian
Zip Codes or otherwise optimizing a database of Canadian Zip Codes?

Jeff Kolber
http://www.ForSaleByOwner.com
Thread
zip code search within x milesScott Haneda16 Apr
  • RE: zip code search within x milesgunmuse16 Apr
  • Re: zip code search within x milesRobert Dunlop16 Apr
    • RE: zip code search within x milesScott Johnson19 Apr
  • Re: zip code search within x milesGreg Donald16 Apr
  • Re: zip code search within x milesScott Gifford16 Apr
    • RE: zip code search within x milesgunmuse16 Apr
      • Re: zip code search within x milesJeff Kolber16 Apr
        • Re: zip code search within x milesScott Gifford17 Apr
          • Re: zip code search within x milesJeff Kolber20 Apr
  • Re: zip code search within x milesRichard Lynch19 Apr
    • Re: zip code search within x milesparis lundis19 Apr
      • Re: zip code search within x milesHank19 Apr
    • Re: zip code search within x milesHank19 Apr
      • Re: zip code search within x milesRichard Lynch25 Apr
  • Re: zip code search within x milesEamon Daly19 Apr
    • RE: zip code search within x milesScott Johnson19 Apr
  • Re: zip code search within x milesEamon Daly19 Apr
    • Re: zip code search within x milesHank19 Apr
      • Re: zip code search within x milesKeith Ivey19 Apr
        • Re: zip code search within x milesHank19 Apr
          • Re: zip code search within x milesSGreen19 Apr
            • Re: zip code search within x milesHank19 Apr
              • Re: zip code search within x milesRichard Lynch25 Apr
            • Re: zip code search within x milesJeremy Cole29 Apr
          • Problem detected this morning.Fredrick Bartlett5 Aug
            • Re: Problem detected this morning.Gleb Paharenko7 Aug
        • Re: zip code search within x milesScott Haneda19 Apr
      • Re: zip code search within x milesRichard Lynch25 Apr
        • RE: zip code search within x milesgunmuse25 Apr