[R-sig-Geo] Best way to calculate distance between geographical points

Karl Ove Hufthammer karl at huftis.org
Thu Jan 14 10:27:17 CET 2010


Dear list members

I have found three functions for calculating the distance between 
geographical points, 'geo.dist' in the 'oce' package, 'rdist.earth' in 
the 'fields' package, and 'spDistsN1' in the 'sp' package. They all give 
slightly difference answers, so my question is: which of them is best, 
i.e., gives the most accurate answer?

When it comes to performance, the 'rbenchmark' package shows that (at 
least on calculating a single distance), 'spDistsN1' is the fastest, 
'geo.dist' takes twice as long, and 'rdist.earth' takes about five times 
as long (as 'spDistsN1').

-- 
Karl Ove Hufthammer



More information about the R-sig-Geo mailing list