In the geosphere package on R-Forge there are a number of distance
functions (from law of cosines to more complex) as well as related
spherical trig functions, such as computing paths along a
great-circle. There is also pointDistance in the raster package.

Robert

On Thu, Jan 14, 2010 at 1:27 AM, Karl Ove Hufthammer <k...@huftis.org> wrote:
> 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
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to