Hi Chris. I saw your posting on Witango talk about zipcodes distance calculation using latitudes and longitudes. In it you have said their are 2 formulae to calculate it. One is the "flat-earth" calculation,. and the other is "curvature" formula. Can you please tell which one is the curvature formula? I am a bit confused.
Is this formula for curvature?
(3963*ACOS(SIN(@@Resultset[1,1]/57.2958)*SIN(locator.lat/57.2958)+ COS(@@Resultset[1,1]/57.2958) *COS(locator.lat/57.2958)*COS((locator.lon/57.2958)-(@@Resultset[1,2]/57.2958))))

If not, can you give the curvature formula?

Thanks,
K

On 4/27/05, Chris Millet <[EMAIL PROTECTED] > wrote:
Correct.

Specifically, the difference between the two formulas is that one takes
into account the curvature of the earth in calculating the distance
between point A and point B (without going through each intermediary
lon/lat coordinate, a 'straight' calculation would 'pierce' through the
earth where it curves, thereby underestimating the distance in varying
amounts depending on the distance).


On Apr 27, 2005, at 11:14 AM, Roland Dumas wrote:

>
> So the distances are as the crow flies, right? Not as the Ford drives.
>
>
> On 4/27/05 7:26 AM, "Chris Millet" <[EMAIL PROTECTED]> wrote:
>
>> Stefan,
>>
>> Here's a simple taf we built to calculate the distance of all stores
>> within a 100 mile radius of the user. You will need two tables: A
>> stores table listing all your stores with zip codes and a locator
>> table
>> listing all the zip codes along with longitude and latitude (we found
>> a
>> CD online for a small fee). The rest is in the taf itself.
>>
>> Note: I believe there are a couple of different formulas with varying
>> margins of error. The one we used is the most accurate. It may look
>> confusing, but if you look at it, there are very few variables –just
>> the user's lon/lat coordinates and the radius you want to return, I
>> believe.
>>
>> Anyway, it shouldn't be difficult once you get the database of
>> zips/lons/lats.
>>
>> Best,
>> Chris
>
>
> _______________________________________________________________________
> _
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to