You can also not think about the math, precompute the distance tables, and
then only keep data in there where the distance is <x miles.  

Russ

> -----Original Message-----
> From: Rick Root [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 06, 2007 3:10 PM
> To: CF-Talk
> Subject: Re: Transact-SQL help
> 
> Actually, I did a limitation by longitude as well, because at the equator,
> the fudge factor is the same (approximatley 69 miles per degree)...
> everything in the US is less than that but I figured what the heck.  So I
> draw the box on both lat and long, knowing that the longitude will
> actually
> encompass MORE than the area I'm looking for... the getDistance() function
> actually does the work of exact distances anyway.  As long as the "box" is
> bigger than necessary, it's all good.
> 
> I was thinking it might actually be wise to use a range factor GREATER
> than
> 1/69 ... like 2/69...giving the latitude some wiggle room.
> 
> But thinking about the math involved as to *WHY* I'd do that makes *MY*
> head
> hurt!
> 
> 
> 
> On 2/6/07, Jim Wright <[EMAIL PROTECTED]> wrote:
> >
> > Rick Root wrote:
> > >
> > > I like how you're limiting by latitude only and using the radius as
> > well.
> > >
> >
> > Thinking about limiting it by longitude made my head hurt...I thought
> > about using some larger constant (like the 2 degrees that you used), but
> > in Alaska, 2 degrees longitude only equates to about 44 miles in some
> > places.  Limiting by latitude at least gets the bulk of the comparisons
> > out of the way.
> >
> >
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268882
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to