Forum OpenACS Q&A: Response to zip code distance matrix
2: Response to zip code distance matrix (response to 1)
Posted by Bart Teeuwisse on 01/23/02 10:08 PM
Take a look at Zipdy (http://www.cryptnet.net/fsp/zipdy/). Zipdy is a program for calculating the distance between two zip codes and finding all the records in a RDBMS with a zip code with x miles of another zip code. Currently, RDBMS support exists for postgreSQL.
Zipdy is free software released under the terms of the GNU General Public License. Zipdy was written in C but is also available in PHP and perl. It runs with data from the US Census Gazetteer program. The original Gazetteer data is available here. The data is from the 2000 census.
The distance calculations are made by doing a great circle calculation on longitude and latitude points provided by the census data. The result is returned in standard miles.