>Hi All.
>
>I wonder if anyone out there has code or algorithm to calculate distance from 2 zipcodes.
>
>Thanks,
>
>Alen Kalati
>SmartsCorp
The distance between two zips would be arbitrary since it would depend on where in each zipcode you are measuring from. However, if you wanted to give the distance from the
center of each zip, that doesn't seem like it would be very hard. You would need a table with zipcodes and their longitude/latitude coordinate quad (a long/lat pair for each corner of the zip region). With these you could easly calculate a long/lat point in the center of the zipcode. Once you have the two zipcode centers, you could calculate the distance between them. This would be a close approximation and has one major drawback: the measurement will only be accurate from the center of each zip. As such, it would have an inherent percent error which is inversely proportional to the distance between the two zips.