Re: [R-sig-Geo] Distance between two points

2012-12-08 Thread O'Hanlon, Simon J
Michael Sumner Sent: 07 December 2012 19:33 To: roger.biv...@nhh.no Cc: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] Distance between two points Reproject the points to the coordinate system of thr grid, do the overlay then copy the attributes back. No need to warp a raster just for over(lay

Re: [R-sig-Geo] Distance between two points

2012-12-07 Thread Michael Sumner
r for warping. > > Roger > > >> Sarah >> >> >> Thanks again for your help. >>> >>> Cheers, >>> >>> Simon >>> >>> -Original Message- >>> From: Sarah Goslee [mailto:sarah.gos...@gmail.com] >

Re: [R-sig-Geo] Distance between two points

2012-12-07 Thread Roger Bivand
: O'Hanlon, Simon J Cc: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] Distance between two points Precisely. You should use great-circle distances with lat-lon coordinates, rather than Euclidean distance, because the actual length varies with position on the globe. Converting to UTM or so

Re: [R-sig-Geo] Distance between two points

2012-12-07 Thread Sarah Goslee
. Or am I missing something? Sarah > Thanks again for your help. > > Cheers, > > Simon > > -Original Message- > From: Sarah Goslee [mailto:sarah.gos...@gmail.com] > Sent: 07 December 2012 14:18 > To: O'Hanlon, Simon J > Cc: r-sig-geo@r-project.org > S

Re: [R-sig-Geo] Distance between two points

2012-12-07 Thread Sarah Goslee
Precisely. You should use great-circle distances with lat-lon coordinates, rather than Euclidean distance, because the actual length varies with position on the globe. Converting to UTM or something similar is one solution if your points are not too far apart. There are many other R solutions: se

[R-sig-Geo] Distance between two points

2012-12-07 Thread O'Hanlon, Simon J
Dear list, I am using the package geoRglm to do some predictive mapping. There is a function that calculates the distance between observed data points and the prediction locations using a .C call to a function which eventually calculates the length of the hypotenuse between one location and the