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
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?