Ross,
The geodist function in the package GMT will compute distance in all sorts of units (m, km etc.) from lat longs.

Hugh

> Date: Thu, 16 May 2013 14:16:03 +0100
> From: rossahmed@googlemail.com
> To: r-sig-geo@r-project.org
> Subject: [R-sig-Geo] nearest neighbour using distance in metres
> 
> Hi all,
> 
> Following code computes Euclidian distance from each point to it nearest
> neighbour:
> 
> library(spatstat)
> y <- rnorm(30, 55.65, .008)
> x <- rnorm(30, -1.82, .01)
> xy <- cbind(x, y)
> nndist(xy)
> 
> Is it possible to use distance in metres, not Euclidian distances? Here are
> same points projected:
> 
> xySpatial <- SpatialPoints(xy, proj4string= CRS("+proj=longlat +datum=WGS84
> +ellps=WGS84 +towgs84=0,0,0"))
> xySpatialTransformed <- spTransform(xySpatial, CRS("+proj=laea +lon_0=-1.92
> +lat_0=55.7 +datum=WGS84"))
> 
> Thanks
> Ross
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
 		 	   		  
	[[alternative HTML version deleted]]

