RE: Semi-OT - Zip code dbs/dist. formulas?

2001-01-15 Thread Michael Thomas

I just used mapquest.com to get any zip codes I would like to calculate the 
long/lat for. You can get all that info there. Also below is your mystical 
formula ;)

CFSET City1="Los Angeles"
CFSET City2="New York City"
CFSET State1="California"
CFSET State2="New York"

CFSET Latitude1="34.0522"
CFSET Latitude2="40.7142"
CFSET Longitude1="-118.2428"
CFSET Longitude2="-74.0064"

CFSET Temp = sin(Latitude1) * sin(Latitude2 * pi()/180) +
cos(Latitude1) * cos(Latitude2 * pi()/180) *
cos(Longitude2 * pi()/180 - Longitude1)
CFIF temp IS 1
CFSet Mileage = 0
CFElse
CFSET Mileage = 3963.0 * (ATN(-Temp / SQR(-Temp * Temp + 1))
+ 1.570796326794895)
CFSet Mileage = Round(Mileage * 100) / 100
/CFIF

CFOUTPUT
bTemp value:/b #Temp#br /
It is b#Mileage# miles/b from b#City1#, #State1#/b to b#City2#, 
#State2#/bbr /
/CFOUTPUT

-Original Message-
From: Scott Weikert [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 3:30 PM
To: CF-Talk
Subject: Semi-OT - Zip code dbs/dist. formulas?


Hey gang,

I'm wondering if anyone has, or can point me at, a good (i.e. cheap or free)
source for zip code data, along with lat/long values for each, and the
mystical formula for calculating the distance between one lat/long and
another lat/long.

Thanks,
--Scott
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Semi-OT - Zip code dbs/dist. formulas?

2001-01-15 Thread Jeff Beer

Hi Scott,

Check out http://www.dbactive.com for some zipcode calc tools for CF,
including radius search and distance betweem two zips.

Regards,

Jeff

 -Original Message-
 From: Scott Weikert [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 10, 2001 6:30 PM
 To: CF-Talk
 Subject: Semi-OT - Zip code dbs/dist. formulas?


 Hey gang,

 I'm wondering if anyone has, or can point me at, a good (i.e.
 cheap or free)
 source for zip code data, along with lat/long values for each, and the
 mystical formula for calculating the distance between one lat/long and
 another lat/long.

 Thanks,
 --Scott



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Semi-OT - Zip code dbs/dist. formulas?

2001-01-12 Thread David Shadovitz

The earth is not flat, so it isn't so simple.  The distance between
longitudes depends on the latitude.  In technical terms, those lines
scrunch up at the poles.

Here are some resources; you can find others with a web search on
DISTANCE and LATITUDE and EARTH.  Note that generally people want the
distance on the earth's surface, not *through* the earth.  

Latitude/Longitude Distance Calculation,
http://www.nau.edu/~cvm/latlongdist.html
Surface Distance Between Two Points of Latitude and Longitude,
http://www.vsv.slu.se/johnb/java/lat-long.htm

-David
(B.A. Math and Physics, Univ. of Pennsylvania '85; former staffer at
Hughes Aircraft, where I contributed to the mapping algorithm for the
Magellan probe of Venus.)

On Wed, 10 Jan 2001 22:05:04 -0800 "Dylan Bromby" [EMAIL PROTECTED]
writes:
 http://www.tpsnet.com/html/zipcode.html
 
 and the "mystical" formula is pretty much pythagorean's theorem.
 
 -Original Message-
 From: Scott Weikert [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 10, 2001 3:30 PM
 To: CF-Talk
 Subject: Semi-OT - Zip code dbs/dist. formulas?
 
 
 Hey gang,
 
 I'm wondering if anyone has, or can point me at, a good (i.e. cheap 
 or free)
 source for zip code data, along with lat/long values for each, and 
 the
 mystical formula for calculating the distance between one lat/long 
 and
 another lat/long.
 
 Thanks,
 --Scott
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Semi-OT - Zip code dbs/dist. formulas?

2001-01-10 Thread Dylan Bromby

http://www.tpsnet.com/html/zipcode.html

and the "mystical" formula is pretty much pythagorean's theorem.

-Original Message-
From: Scott Weikert [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 3:30 PM
To: CF-Talk
Subject: Semi-OT - Zip code dbs/dist. formulas?


Hey gang,

I'm wondering if anyone has, or can point me at, a good (i.e. cheap or free)
source for zip code data, along with lat/long values for each, and the
mystical formula for calculating the distance between one lat/long and
another lat/long.

Thanks,
--Scott
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists