Learn R Programming

seeg (version 1.0)

Kriging: Kriging Functions

Description

Functions for kriging.

Usage

Okriging(dataset, vario, step, maxdist, border.sw=FALSE, border.poly="none")
plotkriged(dataset, kriged, outpdf="dataset-kriged.pdf", border.sw=FALSE, border.poly="none")
scan.map.ras(filename)
make.variogram(nugget=0, sill = 1000, range = 1000)

Arguments

dataset
data frame with point pattern; columns 1 and 2 are x,y coordinates, 3 is variable
vario
variogram to use for kriging
step
step interval for prediction grid
maxdist
maximum distance for prediction
border.sw
logical to use border
border.poly
border polygon
kriged
kriged data
outpdf
output pdf filename
filename
name of file to scan
nugget
estimated nugget
sill
estimated sill
range
estimated range

Value

  • xx coordinates of kriged data
  • yy coordinates of kriged data
  • zhatkriged values
  • varhatvariance of kriged values
  • variab.rasvariable raster map
  • v.m.objectvariogram model

Details

Okriging performs ordinary kriging on a grid. First, select a step for the grid for the prediction. Use minimum and maximum values in each axis to select a distance step. It uses function krige of sgeostat. Okriging produces a dataset of the kriged values of the variable (marks z) over the prediction grid together with the variance of the kriging error.

Function plotkriged produces two maps in a pdf file: 1) a raster image of the kriged values, superimposed on a contour map, and a plot of the original point pattern (measured points). 2) is the variance of the kriging error over the domain. The function scan.map.ras is based on reading a file with format similar to GeoEAS and using image and contour commands applied to the transpose. When scanning, we take into account that the first row is the southernmost row and the last row is the northernmost row. Each row goes from west to east. The input file contains values of one variable z, a header with a title, then number of columns and rows for the grid. Then it specifies the cell size. Then the file specifies the number of variables in the file, and labels for the measurements. After that, we have a stream of values. In general, we can have more than one variable and therefore each record can have more than one number.

Function make.variogram directly forces a model with selected parameter values.

References

Acevedo M.F. 2013. "Data Analysis and Statistics for Geography, Environmental Science, and Engineering", CRC Press.

See Also

convert to ppp object ppp, plot plot, plot plot, sgeostat point, pair, krige,

Examples

Run this code
xyz.ok <- Okriging(xyz, xyz.vsph, step=0.1, maxdist=0.25)
plotkriged(xyz, xyz.ok,outpdf="lab12/xyz-kriged.pdf")
test.ras <- scan.map.ras("lab12/grid30x30.txt")
xyz.vsph <- make.variogram(nugget=0, sill=160, range=0.1)

Run the code above in your browser using DataLab