Re: [R-sig-Geo] Verify units of distance between coordinates

2014-08-30 Thread Robert J. Hijmans
library(geosphere) d <- distCosine(df[, 1:2], df[,3:4]) On Thu, Aug 28, 2014 at 8:02 AM, Roger Bivand wrote: > On Thu, 28 Aug 2014, Roger Bivand wrote: > >> On Thu, 28 Aug 2014, Sarah Goslee wrote: >> >>> On Thu, Aug 28, 2014 at 9:32 AM, Michael Sumner >>> wrote: On Thu, Aug 28, 201

Re: [R-sig-Geo] Verify units of distance between coordinates

2014-08-28 Thread Roger Bivand
On Thu, 28 Aug 2014, Roger Bivand wrote: On Thu, 28 Aug 2014, Sarah Goslee wrote: On Thu, Aug 28, 2014 at 9:32 AM, Michael Sumner wrote: On Thu, Aug 28, 2014 at 10:50 PM, Sarah Goslee wrote: They don't make sense. Best: convert them into a projection where the distances are in meters alre

Re: [R-sig-Geo] Verify units of distance between coordinates

2014-08-28 Thread Roger Bivand
On Thu, 28 Aug 2014, Sarah Goslee wrote: On Thu, Aug 28, 2014 at 9:32 AM, Michael Sumner wrote: On Thu, Aug 28, 2014 at 10:50 PM, Sarah Goslee wrote: They don't make sense. Best: convert them into a projection where the distances are in meters already, like UTM. Then distances calculated on

Re: [R-sig-Geo] Verify units of distance between coordinates

2014-08-28 Thread Sarah Goslee
On Thu, Aug 28, 2014 at 9:32 AM, Michael Sumner wrote: > On Thu, Aug 28, 2014 at 10:50 PM, Sarah Goslee wrote: >> They don't make sense. >> >> Best: convert them into a projection where the distances are in meters >> already, like UTM. Then distances calculated on your new coordinates >> are in m

Re: [R-sig-Geo] Verify units of distance between coordinates

2014-08-28 Thread Michael Sumner
On Thu, Aug 28, 2014 at 10:50 PM, Sarah Goslee wrote: > They don't make sense. > > Best: convert them into a projection where the distances are in meters > already, like UTM. Then distances calculated on your new coordinates > are in meters. However great circle from lat/lon is arguably the best

Re: [R-sig-Geo] Verify units of distance between coordinates

2014-08-28 Thread Sarah Goslee
They don't make sense. Best: convert them into a projection where the distances are in meters already, like UTM. Then distances calculated on your new coordinates are in meters. Latitude and longitude don't translate neatly into distances on their own. Second best: find and use a great circle di

[R-sig-Geo] Verify units of distance between coordinates

2014-08-28 Thread Justin Michell
Dear geo R group I have a data frame like this: df <- data.frame(Lon = c(29.6000,29.7333,30.3887,30.6667,30.6833,30.8667), Lat = c(-4.9000,-4.6000,-5.1280,-1.0667,-2.7500,-3.3833), LonWater = c(29.6,29.6,30.25000,30.65000,30.35444,30.83278), LatWater = c(-4.31667,-4