[R-sig-Geo] Matrix of distances (km) between Coordinates

Edzer Pebesma edzer.pebesma at uni-muenster.de
Thu May 19 21:24:44 CEST 2011


?spDists in package sp, with argument longlat = TRUE.

On 05/19/2011 06:46 PM, Barry Rowlingson wrote:
> 2011/5/19 Marcelino de la Cruz <marcelino.delacruz at upm.es>:
>> as.matrix(dist(corrdinates))
> 
>  For small distances near the equator yes! Don't try this if you are
> studying polar bears!
> 
>  Try rdist.earth in the 'fields' package, or try transforming to a
> euclidean coordinate system using spTransform before using dist.
> 
> Barry
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list