zackrspv Posted March 16, 2009 Share Posted March 16, 2009 So, I was making a program to automatically show the distance between a client's START zip code, and that of the zip codes of our events. Since i made this script FIRST, to ensure that the math was working with the formulas i found online, I decided to make it a bit easier to read, and follow. Basically, it uses the (somewhat hacked version, hehe) Haversine formula to calculate the distance across a sphere from the given zip code's latitude and longitude positions. The data is provided by the US Census bureau, and the file is required to run the program NOTE: As it's math, and not pulling from a secondary site, no, it's not 100% accurate; but, hey, it gets you the information rather close to the actual distance.InstructionsDownload ZIP Code DATA: http://www.census.gov/tiger/tms/gazetteer/zcta5.zipDownload the following script, and put BOTH files in the SAME DIRECTORY and run What happens when script runs normally.What happens when Zip1 or Zip2 is bad.Enjoy!dst.au3 -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
gseller Posted March 16, 2009 Share Posted March 16, 2009 Very nice! Thanks for sharing.. Link to comment Share on other sites More sharing options...
sias Posted March 16, 2009 Share Posted March 16, 2009 Excellent Program, and an interesting way of calculating distance. When I first read the topic I assumed you would just pull information from MapQuest or Google Maps; Using Latitude/Longitude is an original way of doing it. "The true measure of a man is how he treats someone who can do him absolutely no good." Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now