You can just do
xy <- coordinates(r1)
which gives a 2-column matrix with
lon <- xy[,1]
lat <- xy[,2]
Note that for largish rasters this is a considerable amount of data,
and it's mostly all redundant since you can generate it from the
resolution and extent, so you might need to consider other o
Dear all,
Is there any way to access the vector containing the longitude and latitude
coordinates of a raster object? For example:
library(raster)
r1 <- raster(nrows=800, ncols=820, xmn=0, xmx=10)
# I am looking for something like this:
r1$lon
r2$lat
Thanks in advance,
Thiago.
_
Thanks.
In case it might help, I'm putting here a rude but hopefully correct LOO
sample code for STFDF objects:
-
N_POINTS <- nrow(mySTFDF[,])
krigeST.predictions <- array(dim=N_POINTS)
for (point in 1:N_POINTS) {
# Remove one station
mySTFDF.lessone <-
On 01/21/2013 10:26 PM, Oscar Perpiñan wrote:
> Hello,
>
>> I'll see how I can integrate this with spplot.
>> Edzer Pebesma
>
> Perhaps the approach of the figure 5.6 of the "Lattice" book can be more
> easily integrated in the spplot method:
> http://lmdvr.r-forge.r-project.org/figures/figures
Thanks Roger.
Apologies: the two functions I intended to reference in my original post
were igraph::get.adjacency() and igraph::get.edgelist() which produce a
slightly clearer broth (I like this expression "fish soup").
Your suggestion requiring a third party package seems the easiest. I
fou
Hello,
I've been very interested in your recently published package in CRAN.
However I was disappointed by yor shortage of description of this package.
Waldo Tobler's original paper dealt with following three types of parameter
calibration methods as you might know.
From reading sc
It indicates a singular or near-singular covariance matrix.
The two most common reasons for this are: (i) you have one or more
duplicate observations (try: zerodist(Dembia.utm)) , or (ii) using a
Gaussian variogram model.
Deciphering your "script", it seems (ii) might apply.
On 01/22/2013 01:09
Dear all,what is LDLfactor in kriging?I got at error message while I was using
OK. the error statement is like this "Error in predict.gstat(g, newdata =
newdata, block = block, nsim = nsim, : LDLfactor "
I was using the following optional script for kriging to run: 1. 2. 3.
all of the above gi