 GenerateSpatialData - Maple Help

Interpolation[Kriging]

 GenerateSpatialData
 generate a spatially correlated data set Calling Sequence GenerateSpatialData(variogram) GenerateSpatialData(variogram,n,options) Parameters

 variogram - a supported variogram model n - (optional) the (approximate) number of points generated. The default value is 30. options - (optional) keyword option of the form grid=truefalse or dimension=d. If grid is set to true, the generated data points will be equally spaced along each dimension (default: false). The dimension option sets the dimension of the points to be generated (default: 2). Description

 • The GenerateSpatialData command takes a variogram and generates a set of points and associated data reflective of that variogram model. These points and data can then be used to experiment with, or demonstrate, Kriging interpolation.
 • If the grid=true option is given, then the points are located in a square $d$-dimensional grid, at coordinates equally spaced between 0 and 1. As a consequence, there will be ${k}^{d}$ points in total, for some $k$. Maple chooses $k$ as $⌊{n}^{\frac{1}{d}}⌋$; consequently, the number of points generated may be smaller than $n$. For example, if $d$ has its default value of 2, then the number of points will be reduced to the largest perfect square that is not greater than n.
 • If the grid=true option is not given, then the points are uniformly randomly selected from the $d$-dimensional unit cube. In this case, exactly $n$ points are generated.
 • The data set is returned as an expression sequence of a list of lists representing the points, and a Vector of values at those points. Examples

We generate some points in two dimensions and associated data.

 > $\mathrm{points1},\mathrm{data1}≔\mathrm{Interpolation}:-\mathrm{Kriging}:-\mathrm{GenerateSpatialData}\left(\mathrm{Spherical}\left(1,10,1\right)\right)$ These can be used to demonstrate Kriging interpolation.

 > $\mathrm{k1}≔\mathrm{Interpolation}:-\mathrm{Kriging}\left(\mathrm{points1},\mathrm{data1}\right)$
 ${\mathrm{k1}}{≔}\left(\begin{array}{c}{Kriging intⅇrpolation obȷⅇct with 30 samplⅇ points}\\ {Variogram: Sphⅇrical\left(1.25259453854482,13.6487615617247,.5525536774\right)}\end{array}\right)$ (1)
 > $\mathrm{SetVariogram}\left(\mathrm{k1},\mathrm{Spherical}\left(1,10,1\right)\right)$
 $\left(\begin{array}{c}{Kriging intⅇrpolation obȷⅇct with 30 samplⅇ points}\\ {Variogram: Sphⅇrical\left(1,10,1\right)}\end{array}\right)$ (2)
 > $\mathrm{ComputeGrid}\left(\mathrm{k1},\left[0..1,0..1\right],0.1,\mathrm{output}=\mathrm{plot}\right)$ We now generate some points in a three-dimensional grid and associated data.

 > $\mathrm{points2},\mathrm{data2}≔\mathrm{Interpolation}:-\mathrm{Kriging}:-\mathrm{GenerateSpatialData}\left(\mathrm{RationalQuadratic}\left(0.1,10,4\right),216,\mathrm{dimension}=3,\mathrm{grid}=\mathrm{true}\right)$ > $\mathrm{k2}≔\mathrm{Interpolation}:-\mathrm{Kriging}\left(\mathrm{points2},\mathrm{data2}\right)$
 ${\mathrm{k2}}{≔}\left(\begin{array}{c}{Kriging intⅇrpolation obȷⅇct with 216 samplⅇ points}\\ {Variogram: Sphⅇrical\left(1.49801816123696,21.6426663008101,.8\right)}\end{array}\right)$ (3)
 > $\mathrm{SetVariogram}\left(\mathrm{k2},\mathrm{RationalQuadratic}\left(0.1,10,4\right)\right)$
 $\left(\begin{array}{c}{Kriging intⅇrpolation obȷⅇct with 216 samplⅇ points}\\ {Variogram: RationalQuaⅆratic\left(.1,10,4\right)}\end{array}\right)$ (4)
 > $\mathrm{plots}:-\mathrm{implicitplot3d}\left(\mathrm{k2}\left(x,y,z\right)=\mathrm{Statistics}:-\mathrm{Median}\left(\mathrm{data2}\right),x=0..1,y=0..1,z=0..1,\mathrm{grid}=\left[8,8,8\right]\right)$  Compatibility

 • The Interpolation[Kriging][GenerateSpatialData] command was introduced in Maple 2018.