DESCRIPTION
v.krige allows performing Kriging operations in GRASS GIS
environment, using R software functions in background.
NOTES
v.krige is just a front-end to R. The options and parameters
are the same offered by packages automap and gstat.
Kriging, like other interpolation methods, is fully dependent on input
data features. Exploratory analysis of data is encouraged to find out
outliers, trends, anisotropies, uneven distributions and consequently
choose the kriging algorithm that will give the most acceptable
result. Good knowledge of the dataset is more valuable than hundreds
of parameters or powerful hardware. See Isaaks and Srivastava's book,
exhaustive and clear even if a bit outdated.
Dependencies
- R software >= 2.x
- rpy2
- Python binding to R. Note! rpy version 1 is not supported.
- R packages automap, gstat, rgrass7 and rgeos. 
- automap is optional (provides automatic variogram fit).
Install the packages via R command line (or your preferred GUI):
  install.packages("rgeos", dep=T)
  install.packages("gstat", dep=T)
  install.packages("rgrass7", dep=T)
  install.packages("automap", dep=T)
Notes for Debian GNU/Linux
Install the dependiencies. Attention! python-rpy IS NOT
SUITABLE.:
  aptitude install R python-rpy2
  aptitude install r-cran-gstat r-cran-rgrass7
Notes for Windows
Compile GRASS GIS following this
guide.
You could also use Linux in a virtual machine. Or install Linux in a
separate partition of the HD. This is not as painful as it appears,
there are lots of guides over the Internet to help you.
Computation time issues
Please note that although high number of input data points and/or high 
region resolution contribute to a better output, both will also slow down
the kriging calculation.
EXAMPLES
Kriging example based on elevation map (Spearfish data set).
Part 1: random sampling of 2000 vector points from known
elevation map. Each point will receive the elevation value from the
elevation raster, as if it came from a point survey.
# reduce resolution for this example
g.region raster=elevation -p res=100
v.random output=rand2k_elev npoints=2000
v.db.addtable map=rand2k_elev columns="elevation double precision"
v.what.rast map=rand2k_elev raster=elevation column=elevation
v.extract input=rand2k_elev output=rand2k_elev_filt where="elevation not NULL"
v.univar map=rand2k_elev_filt type=point column=elevation
# automatic variogram fit
v.krige input=rand2k_elev_filt column=elevation \
        output=rand2k_elev_kriging output_var=rand2k_elev_kriging_var
# define variogram model, create variance map as well
v.krige input=rand2k_elev_filt column=elevation \
        output=rand2k_elev_filt_kriging output_var=rand2k_elev_filt_kriging_var \
        model=Mat sill=2500 nugget=0 range=1000 
r.mapcalc "rand2k_elev_kriging_pe = sqrt(rand2k_elev_kriging_var)"
r.univar map=elevation
r.univar map=rand2k_elev_kriging
r.univar map=rand2k_elev_kriging_pe
SEE ALSO
R package gstat,
maintained by Edzer J. Pebesma and others
R
package rgrass7,
maintained by Roger Bivand
The Short
Introduction to Geostatistical and Spatial Data Analysis with GRASS GIS
and R statistical data language at the GRASS Wiki (includes
installation tips). It contains a subsection about rgrass7.
v.krige's wiki page
REFERENCES
Isaaks and Srivastava, 1989: "An Introduction to Applied Geostatistics"
 (ISBN 0-19-505013-4) 
AUTHOR
Anne Ghisla, Google Summer of Code 2009
Last changed: $Date: 2015-10-01 12:26:43 +0200 (Thu, 01 Oct 2015) $