in reply to Re: Zipcode search engine
in thread Zipcode search engine
If you call call the UPSPS National Customer Support Center at (800) 238-3150 you can talk to the them about ordering zip/latitude/longitude data
The documentation for this data is available as a pdf on the usps site.
It seems like most people find a vendor to give them this data.The USPS FAQ talks about it a bit.
I'm guessing that the 'ol a**2 + b**2 =c**2 would be how you would compute the shortest distance between two arbitrary zip codes. No doubt the monk map uses nicer code...
Of course you have to (pre?) compute the distance between the user's zip code and many of the other zip codes in your database...use strict; use warnings; my $x1=10; my $y1=20; my $x2=-8; my $y2=2; my $dist=sqrt(($x1-$x2)**2+($y1-$y2)**2); print "$dist =distance";
|
|---|