Zip codes

CEH

Curtis
Local time
Today, 05:18
Joined
Oct 22, 2004
Messages
1,187
Has anyone had any dealings with a way to calculate distance between 2 zipcodes? Of course all the zips wouls be in the current DB.... Then need to query those within a certian distance of another zipcode. I have a feeling this will need to be linked to an external source or app........ BUT... Anybody have any experience with anything similiar?
 
I don't think that you've given this much thought.

Maybe if you have GPS coordinates for the boundary lines of each zipcode.

I know that the US Gov't has GPS coordinates for every address in the US. I have a former client who used them for giving driving directions between two addresses.

What does MapQuest and google Earth do?

You're getting ready to spend some big time dough.
 
You could generate this information if you have a GIS program like ArcMap with access to a polygon file of the zipcodes (usually pretty attainable if you use GIS much).

You may want to restrict this to only the zipcodes in your db or you'll need a supercomputer to do this!

Use an extension like Xtools (Shapes to Centroids function) to create a new layer of points showing the center of each polygon with attached attribute information from the original polygon layer.

Then use the 'Distance between points' funtion in the 'Hawths Analysis Tools' extension to generate a matrix of distances between the points.

EDIT: Use the csv file to create a table for looking up the distance.
 
Thanks guys.... You have proven to me that the boss wanting this done IS nuts :) If I was going to go for something like this I'd be building the next "Mapquest" And I sure as **** wouldn't do that unless the profits were all mine :)

Thanks again
 
Don't bother. Check the U.S. Postal Service. They make a file of the centroid coordinates of every ZIP code. You pay media charges and get the data for free. (Because it was bought with tax money, in theory you have already paid for it.)

Then you can do any of a gazillion things involving distances on the surface of a sphere. There are "great circle" formulae that you can use to compute the straight-line-on-a-spherical-surface distance between two points as defined in the ZIP code table.

We use it for the U.S. Navy because we estimate travel allowances based on the linear distance between a person's home base and their temporary duty destination. The mileage is a good approximation and we generally can get within a percent or two of actual average mileage for a group of traveling sailors. The math isn't THAT hard and you can find the formulas on-line. VBA does trig functions and that's all the math you'll really need.
 

Users who are viewing this thread

Back
Top Bottom