Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Zip Code Proximity Algorithm
Message
 
À
13/11/1997 19:40:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00060165
Message ID:
00060665
Vues:
29
>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.

Michael G. Emmons
memmons@nc.rr.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform