Dear All,
An interpolation grid of spacing 100m by 100m was created for irregular
space spatial data. The plot of the grid and sample data shows some grid
points outside the data area. I guess the preducted values of thos points
outside the data area will not be reliable. How do I modify my R script so
that the grid can be created within the domain of sample data.

My R script is as follows:
# get the range of spatial coordinates in the data
easting.range <- as.integer(range(canmod.sp@coords[,1]))
northing.range <-as.integer(range(canmod.sp@coords[,2]))
## now expand to a grid with 100 meter spacing:
grd <- expand.grid(x=seq(from=easting.range[1], to=easting.range[2],
by=100),
y=seq(from=northing.range[1], to=northing.range[2], by=100))
names(grd)<-c("easting","northing")
coordinates(grd)<-~easting+northing
proj4string(grd)<-CRS("+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84
+units=m +no_defs +towgs84=0,0,0")
## test it out:
plot(grd, cex=0.2)
points(canmod.sp, pch=1,col="red", cex=0.4)
title("Interpolation Grid and Sample Points")
 #### Ordinary kriging to create kriging prediction object
prok <- krige(id="yield",yield ~ 1, canmod.sp, newdata = grd,
model=exp.mod,block=c(10,10),nmax=100)
Thanks
Moshood

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to