Re: [R] Geographic distance between lat-long points in R?

2011-04-21 Thread Crigou
Please allow me to present you the ultimate distance calculation algorithm by Charles Karney, accurate to one nanometre: http://geographiclib.sourceforge.net/cgi-bin/Geod -- View this message in context: http://r.789695.n4.nabble.com/Geographic-distance-between-lat-long-points-in-R-tp3442338p3466

Re: [R] Geographic distance between lat-long points in R?

2011-04-18 Thread Scott Chamberlain
Hi Curt, Thanks for the help. According to that blogpost you sent, I am using the function gcd.hf using the Haversine formula. I wrapped it up in a function called CalcDists so that I can get a distance matrix between N sites. I don't know much about calculating distances, so does this seem

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread Seeliger . Curt
> A comparison of some geographic distance calculations is provided at > http://pineda-krch.com/2010/11/23/great-circle-distance-calculations-in-r/ > , along with code for calculating the Vincenty inverse formula, which > relies on the WGS-84 ellipsoid approximations. You know, Scott, I shoul

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread Scott Chamberlain
Thanks very much for the help! Scott On Monday, April 11, 2011 at 12:54 PM, seeliger.c...@epamail.epa.gov wrote: > I have a bunch of geographic locations specified by lat-long > > coordinates. What's an easy way to calculate geographic distance > > between any two points? OR, perhaps there is

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread Seeliger . Curt
> I have a bunch of geographic locations specified by lat-long > coordinates. What's an easy way to calculate geographic distance > between any two points? OR, perhaps there is a function for > calculating a distance matrix for K sites? A comparison of some geographic distance calculations is

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread dirknbr
I found something here http://www.biostat.umn.edu/~sudiptob/Software/distonearth.R #The following program computes the distance on the surface of the earth between two points point1 and point2. Both the points are of the form (Longitude, Latitude) geodetic.distance <- function(point1, point2) {

Re: [R] Geographic distance between lat-long points in R?

2011-04-11 Thread Eik Vettorazzi
Hi Scott, have a look at the 'earth.dist'-function in the package 'fossil'. hth. Am 11.04.2011 17:37, schrieb Scott Chamberlain: > Dear R, > > > I have a bunch of geographic locations specified by lat-long coordinates. > What's an easy way to calculate geographic distance between any two poin

[R] Geographic distance between lat-long points in R?

2011-04-11 Thread Scott Chamberlain
Dear R, I have a bunch of geographic locations specified by lat-long coordinates. What's an easy way to calculate geographic distance between any two points? OR, perhaps there is a function for calculating a distance matrix for K sites? Sincerely, Scott Chamberlain [[alternativ