Interpolates result values with given spatial information.
result.extract.interpolate(mask.grid, values, alt, x, y)
The grid with spatial information the values are ordered by.
The values which should be interpolated.
The related altitude for the gridcells of ‘mask.grid’.
The related Rechtswert (Gauss-Krueger-coordinates) for the gridcells of ‘mask.grid’.
The related Hochwert (Gauss-Krueger-coordinates) for the gridcells of ‘mask.grid’.
A vector with the interpolated values.
Interpolates result values with given spatial information by external drift kriging.
Krige, D.G., 1951. A statistical approach to some basic mine valuation problems on the witwatersrand. Journal of the Chemical, Metallurgical and Mining Society of South Africa 52, 119-139. Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat package. Computers & Geosciences 30, 683-691.
# NOT RUN {
## load preprocessed data
data(dataFinal)
## load spatial information
data(relatedGrid)
## set or load params
params <- c(0, 0.058326, 0.109494, 0.039178,
-10.34, -0.89, 18.11,-10.03,
28.61, 44.49)
## apply model
result <- pim.solve(params, dataFinal, model.no=11,
silent=FALSE, out2File=FALSE)
## resolve outlier information
outliers <- result$outlier.bb + result$outlier.lc
outliers.na <- which(is.na(outliers)==TRUE)
outliers[outliers.na] <- rep(0, length(outliers.na))
mask.grid <- relatedGrid
## extract valid modelled values
values.model <- result.extract.sub(mask.grid=mask.grid,
result$doy.bb.pim, result$gk4.x,
result$gk4.y, outliers=outliers,
silent=FALSE, withOutliers=FALSE)$values
## interpolate result values with spatial informations of mask.grid
values.model <- result.extract.interpolate(mask.grid=mask.grid,
values=values.model, alt=mask.grid$alt,
x=mask.grid$x, y=mask.grid$y)
# }
Run the code above in your browser using DataLab