Distance between points
The great circle distance d between two points with coordinates {lat1,lon1}
and {lat2,lon2} is given by:d=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2)) Also... if you need a zip code database you can download mine from http://www.cfdynamics.com/zipbase -Novak ----- Original Message ----- From: "Andy Ousterhout" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Saturday, January 18, 2003 4:30 PM Subject: RE: distance between zip codes > Search the archives. Basically, buy a DB that provides ZIP Code to lat > longitude, then calculate. Here is one post that I saved . > > For those who were looking for the UDF to do distance between two > lat/lons, here's my version: > > http://toshop.com/udf/latlondist.cfm > > Rob Brooks-Bilson wrote a UDF at cflib.org that does basically the same > thing but I use a different calculation that's subject to little > rounding error for short distances, has more options for the result > units and has more precise conversion factors. Rob's UDF also requires > DegToRad UDF which mine does not require since I've done the conversion > within the latlondist UDF. > > Rob's version is here: > > http://www.cflib.org/udf.cfm?ID=73 > > > > > -----Original Message----- > From: Dave Lyons [mailto:[EMAIL PROTECTED]] > Sent: Saturday, January 18, 2003 6:09 PM > To: CF-Talk > Subject: distance between zip codes > > > anyone know of a good tag or tutorial that calculates the distance between > zip codes? > I found 1 but it was like $400 > Dave > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

