Re: [R-sig-Geo] adding maps to spplot

2013-05-16 Thread Raffaele Morelli
2013/5/16 Alemu Tadesse alemu.tade...@gmail.com I am plotting a krigged values of irrdiance with the following command. spplot(p1, zcol=insol.pred, col.regions=terrain.colors(30), cuts=30, sp.layout=list(pts1), contour=TRUE, labels=TRUE, pretty=TRUE, col='brown', main=title1) I want to

[R-sig-Geo] nearest neighbour using distance in metres

2013-05-16 Thread Ross Ahmed
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:

Re: [R-sig-Geo] nearest neighbour using distance in metres

2013-05-16 Thread Matteo Mattiuzzi
Dear Ross, Euclidean Distance is not an units, it is a type of distance measurement an it is always in input units! The Euclidean Distance is the length of a rope between your hands that you hold strained, but see here: http://en.wikipedia.org/wiki/Euclidean_distance

[R-sig-Geo] hand rolled spatial correlation in gnls and how to extract conditioned residuals?

2013-05-16 Thread Seth Myers
I'm not getting any help from r-sig-mixed mailing list, so I thought I'd ask this here as it is related to spatial modeling. Questions: 1. Is there anything obviously wrong in concept or code with the following approach? 2. How do I extract residuals from models using correlation= argument so

Re: [R-sig-Geo] nearest neighbour using distance in metres

2013-05-16 Thread Hugh Sturrock
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: rossah...@googlemail.com To: r-sig-geo@r-project.org Subject: [R-sig-Geo] nearest neighbour using distance in metres Hi

Re: [R-sig-Geo] Finding the Circumscribing Circle of a polygon

2013-05-16 Thread Michael Sumner
Just FYI, there is tripack::circumcircle, here's an example with data in the maptools package. library(maptools) data(wrld_simpl) poly - wrld_simpl[wrld_simpl$NAME == Australia, ] ## use coercion to get raw vertices (long winded, but avoids @ usage) coords - coordinates(as(as(poly,