As a relatively inexperienced user of R and RGeostats* I have been reluctant to post this problem which I assume quite simple and more down to ignorance.
I am trying to krige [2D] within an orebody, the extent of which is delineated by the drill holes plotted as points on my grid in the below kriging interpolation.
Code:
- Code: Select all
####
neigh=neigh.create(ndim = 2, type = 0)
db.Zn.target=db.grid.init(db.Zn,nodes=c(200,150))
db.Zn.target
OK_Zn=kriging(db.Zn,db.Zn.target,Vario_Zn_M,mean=NA,neigh)
OK_Zn
# Display Kriging Estimates #
quilt.plot(OK_Zn[,2], OK_Zn[,3], OK_Zn[,4],nx =200, ny=150,col=tim.colors(256),xlab = "Easting(m)", ylab = "Northing(m)",main="Ordinary Kriging Estimates(Isotropic Model) [Zn %]",asp=1)
points(VMS_data$longitude,VMS_data$latitude,col=1,pch=".",cex=2)
# Display Kriging Standard Deviations#
quilt.plot(OK_Zn[,2], OK_Zn[,3], OK_Zn[,5],nx =200, ny=150,col=tim.colors(256),xlab = "Easting(m)", ylab = "Northing(m)",main="Ordinary Kriging Standard Deviations (Isotropic Model) [Zn]",asp=1)
points(VMS_data$longitude,VMS_data$latitude,col=1,pch=".",cex=2)
####
As you can see I have been using the function db.grid.init to build a grid from my drill holes on which to krige. However I cannot force the function, using selections or any other modification to only krige within the dimensions of the drill holes, rather I krige to the extent of my grid which is a rectangle.
I learned RGeoStats with the Meuse dataset, for which we relied on the meuse_grid.csv file to krige within the desired area by setting up a target db with the code:
grid=read.csv("meuse_grid.csv")
db.target=db.create(x1=grid$x,x2=grid$y,flag.grid=FALSE)
To krige in this manner I first have to create a grid csv from the datapoints. Unfortunately I have failed to do this using other R functions so I am back with RGeostats wondering if there is a simple solution to this problem using existing functionality to which I am ignorant.
Thanks for taking the time to read this, and for the other posts on these forums that have helped me troubleshoot plenty of other problems on the way