NAME
v.kriging - Interpolates 2D or 3D raster based on input values located on 2D or 3D point vector layer (method ordinary kriging extended to 3D).
KEYWORDS
raster,
3D raster,
ordinary kriging - for 2D and 3D data
SYNOPSIS
v.kriging
v.kriging --help
v.kriging [-2but] input=name [layer=string] phase=string [report=name] [hz_function=string] [output=string] [crossvalid=name] [vert_function=string] [final_function=string] [final_vert_function=string] [atrend=float] [btrend=float] [ctrend=float] [dtrend=float] [fileformat=string] icolumn=name [zcolumn=name] [azimuth=float] [zenith_angle=float] [lmax=float] [vmax=float] [lpieces=integer] [vpieces=integer] [td=float] [hz_nugget=float] [vert_nugget=float] [final_nugget=float] [final_vert_nugget=float] [hz_sill=float] [vert_sill=float] [final_sill=float] [final_vert_sill=float] [hz_range=float] [vert_range=float] [final_range=float] [final_vert_range=float] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags:
- -2
- Force 2D interpolation even if input is 3D
- -b
- Compute bivariate variogram (3D interpolation only)
- -u
- Compute univariate variogram (3D interpolation only)
- -t
- Eliminate trend if variogram is parabolic
- --overwrite
- Allow output files to overwrite existing files
- --help
- Print usage summary
- --verbose
- Verbose module output
- --quiet
- Quiet module output
- --ui
- Force launching GUI dialog
Parameters:
- input=name [required]
- Name of input vector points map
- Or data source for direct OGR access
- layer=string
- Layer number or name
- Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
- Default: 1
- phase=string [required]
- Phase of interpolation. In the initial phase, there is empirical variogram computed. In the middle phase, function of theoretical variogram is chosen by the user and its coefficients are estimated empirically. In the final phase, unknown values are interpolated using theoretical variogram from previous phase.
- Options: initial, middle, final
- report=name
- File to write the report
- hz_function=string
- Horizontal variogram function
- Options: linear, exponential, spherical, gaussian, bivariate
- output=string
- Name for output 2D/3D raster map
- crossvalid=name
- File to write the results of cross validation
- vert_function=string
- Vertical variogram function
- Options: linear, exponential, spherical, gaussian, bivariate
- final_function=string
- Final variogram function (anisotropic or horizontal component of bivariate variogram)
- Options: linear, exponential, spherical, gaussian, bivariate
- final_vert_function=string
- Final variogram function (vertical component of bivariate variogram)
- Options: linear, exponential, spherical, gaussian, bivariate
- atrend=float
- Trend: f(x,y,z) = a*x + b*y + c*z + d
- Default: 0.0
- btrend=float
- Trend: f(x,y,z) = a*x + b*y + c*z + d
- Default: 0.0
- ctrend=float
- Trend: f(x,y,z) = a*x + b*y + c*z + d
- Default: 0.0
- dtrend=float
- Trend: f(x,y,z) = a*x + b*y + c*z + d
- Default: 0.0
- fileformat=string
- File format to save variogram plot (empty: preview in Gnuplot terminal)
- Options: cdr, dxf, eps, tex, pdf, png, svg
- icolumn=name [required]
- Attribute column containing input values for interpolation
- zcolumn=name
- Attribute column containing z coordinates (only for 3D interpolation based on 2D point layer)
- azimuth=float
- Azimuth of variogram computing (isotrophic)
- Default: 45.0
- zenith_angle=float
- Zenith angle of variogram computing (isotrophic)
- Default: 0.0
- lmax=float
- Maximum distance in horizontal direction
- vmax=float
- Maximum distance in horizontal direction (only for 3D variogram)
- lpieces=integer
- Number of horizontal lags
- vpieces=integer
- Number of vertical lags (only for 3D variogram)
- td=float
- Angle of variogram processing
- Default: 45.0
- hz_nugget=float
- Nugget effect of horizontal variogram
- Default: 0.0
- vert_nugget=float
- Nugget effect of vertical variogram
- Default: 0.0
- final_nugget=float
- Nugget effect of anisotropic variogram (or horizontal component of bivariate variogram)
- Default: 0.0
- final_vert_nugget=float
- For bivariate variogram only: nuget effect of vertical component
- Default: 0.0
- hz_sill=float
- Sill of horizontal variogram
- vert_sill=float
- Sill of vertical variogram
- final_sill=float
- Sill of anisotropic variogram (or horizontal component of bivariate variogram)
- final_vert_sill=float
- For bivariate variogram only: sill of vertical component
- hz_range=float
- Range of horizontal variogram
- vert_range=float
- Range of vertical variogram
- final_range=float
- Range of anisotropic variogram (or horizontal component of bivariate variogram)
- final_vert_range=float
- Range of final variogram: one value for anisotropic, two values for bivariate (hz and vert component)
v.kriging constructs 2D / 3D raster from the values located on discrete points using interpolation method
ordinary kriging. In order to let the user decide on the process and necessary parameters, the module performance is divided into three phases:
- initial phase computes experimental variogram.
- Please set up a name of the report file. The file will be created automatically in working directory to enable import of parameters from current to following phases. If the file has been deleted during the module performance, the user is asked to start interpolation again from the initial phase.
- Warning about particular point and "less than 2 neighbours in its closest surrounding. The perimeter of the surrounding will be increased..." indicates that variogram range should be shortened.
- There will appear some temporary files during variogram computation. They will be deleted automatically in following phase. If missing, the user is asked to repeat initial phase.
- It is not necessary to save experimental variogram plots. They just help to estimate parameters of theoretical variogram that will be computed in following step (output contains experimental and theoretical variogram plotted together).
- in the middle phase, the user estimates theoretical variogram setting up the range (if necessary, the sill and the nugget effect as well) to fit the experimental variogram from previous phase.
- Default sill is calculated from variogram values, more details in (Stopkova, 2014).
- Save horizontal and vertical variogram plots using file=extension.
- Experimental anisotropic / bivariate variogram is plotted as a base for final theoretical variogram parameters estimation in final phase.
- final phase performs interpolation based on parameters of theoretical variogram.
- Save anisotropic or bivariate variogram plot using file=extension.
To get optimal results, it is necessary to test various initial settings, anisotropic ratios and variogram functions. Input (2D or 3D point layer) must contain values to be interpolated in the attribute table.
General commands
v.kriging phase=initial in=input_layer icol=name report=report_file.txt file=png
v.kriging in=input_layer phase=middle hz_fun=exponential vert_fun=exponential ic=name file=png \
hz_range=double vert_range=double [hz_sill=double vert_sill=double hz_nugget=double vert_nugget=double] -u
v.kriging in=input_layer phase=final final_fun=exponential final_range=double \
[final_sill=double final_nugget=double] icol=name file=png out=name crossval=crossval_file.txt
Commands based on the dataset of
Slovakia 3D precipitation (Mitasova and Hofierka, 2004). For more detailed information check
case studies. Another examples of 3D interpolation are available in (Stopkova, 2014).
v.kriging phase=initial in=precip3d@PERMANENT ic=precip report=precip3d.txt file=png --o
v.kriging in=precip3d@PERMANENT phase=middle hz_fun=exponential vert_fun=gaussian ic=precip file=png hz_range=100000. vert_range=1600 --o -u
v.kriging in=precip3d@PERMANENT phase=middle hz_fun=exponential vert_fun=gaussian ic=precip \
file=png hz_range=100000. vert_range=1600 --o -u
Note: 3D points in this example are concentrated on the Earth's surface. Thus the deeper / higher, the less accurate result of interpolation.
General commands
v.kriging phase=initial in=input_layer icol=name report=report_file.txt file=png -2
v.kriging in=input_layer phase=final final_function=linear icol=name file=png \
out=name crossval=crossval_file.txt -2
Commands based on 500 random points extracted from input points of Digital Elevation Model (DEM)
elev_lid792_randpts from the North Carolina
dataset (Neteler and Mitasova, 2004).
See the case studies.
v.kriging phase=initial in=elev_lid792_selected ic=value azimuth=45. td=45. \
report=lid792_500_linear.txt -2 --o
v.kriging in=elev_lid792_selected phase=final final_function=linear ic=value \
file=png out=lid792_500_linear crossval=lid792_500_xval_linear.txt -2 --o
- anisotropy in horizontal direction missing
- current version is suitable just for metric coordinate systems
- enable mask usage
- bivariate variogram needs to be rebuilt (theory)
- 2D interpolation from 3D input layer needs to be rebuilt (especially in case that there are too many points located on identical horizontal coordinates with different elevation)
- In case of too much warnings about input points that have "less than 2 neighbours in its closest surrounding. The perimeter of the surrounding will be increased...", please consider shorter variogram range.
- Save just figures with theoretical variogram (using file=extension in the middle and final phase). Experimental variograms are included in the theoretical variogram plot and separate "experimental" plots can be just temporal.
Mitasova, H. and Hofierka, J. (2004). Slovakia Precipitation data. Available at https://grass.osgeo.org/download/data/.
|
Neteler, M. and Mitasova, H. (2004). Open Source GIS: A GRASS GIS Approach.
2nd Ed. 401 pp, Springer, New York. Online Supplement: http://www.grassbook.org
|
Stopkova, E. (2014). Development and application of 3D analytical functions in spatial analyses
(Unpublished doctoral dissertation). The Department of Theoretical Geodesy, Faculty of Civil Engineering
of Slovak University of Technology in Bratislava, Slovakia.
|
v.vol.rst
v.krige
- Gnuplot graphing utility, more
- LAPACK / BLAS (libraries for numerical computing) for
GMATH library (GRASS Numerical Library)
http://www.netlib.org/lapack
(usually available on Linux distros)
Eva Stopkova
functions taken from another modules are cited above the function or at
the beginning of the file (e.g.
quantile.cpp that uses slightly
modified functions taken from the module
r.quantile (Clements, G.))
SOURCE CODE
Available at:
v.kriging source code
(history)
Latest change: Monday Jan 30 19:52:26 2023 in commit: cac8d9d848299297977d1315b7e90cc3f7698730
Main index |
Vector index |
Topics index |
Keywords index |
Graphical index |
Full index
© 2003-2023
GRASS Development Team,
GRASS GIS 8.3.dev Reference Manual