This is a proximity formula I've used to compute the distance between points using the law of cosines and seems to work rather well. Shouldn't be too much effort to create an excel spreadsheet using it.


a = sin(lat1) * sin(lat2)
b = cos(lat1) * cos(lat2) * cos(lon2-lon1)
c = acos(a+b)

Distance = R *c
where R = circumference of the earth (I use 3963.19 miles or convert to what ever units you need)
Latitude and Longitudes need to expressed as Radians:
Radians = degrees *(PI/180)

Good luck!

Viktor Keenan de la Hoz - Senior GIS Technician
City of Phoenix - Street Transportation Department
Design and Construction Management Division



"Hoskins, Richard E." <[EMAIL PROTECTED]>

01/18/2005 02:35 PM
Please respond to Maptitude

       
        To:        "'[email protected]'" <[email protected]>
        cc:        
        Subject:        RE: [Maptitude] Re: measuring distance



Would you share this code?  Very handy. It would facilitate a problem I am setting up for my spatial epidemiology class.
 
Thanks -
 
Dick Hoskins


From: bjs_market_research [mailto:[EMAIL PROTECTED]
Sent:
Tuesday, January 18, 2005 12:25 PM
To:
[email protected]
Subject:
[Maptitude] Re: measuring distance



I have an Excel macro that does this.  All you would need to do is
output the Lat/Long of each layer, paste them into Excel, and push
the button.

--- In [email protected], Tom Shoals <[EMAIL PROTECTED]> wrote:
> I have two point layers (10 parks; 200 personal
> residences). I am trying to find an easy way to
> measure the distance from each residence to each park.
> Is there an easy way to do this in Maptitude? Would a
> script or macro perform this function automatically?
> If so, does anyone have an example of such a script
> they could share?
>
> Thanks for the help.
> Tom
>
>
>            
> __________________________________
> Do you Yahoo!?
> Meet the all-new My Yahoo! - Try it today!
>
http://my.yahoo.com





Yahoo! Groups Links

Yahoo! Groups Links

Reply via email to