SpatialEstimate
✖
SpatialEstimate
creates a spatial prediction from values vali given at locations loci.
Details and Options


- SpatialEstimate is also known as kriging and geospatial prediction.
- SpatialEstimate returns a SpatialEstimatorFunction and is typically used to predict the value for locations other than loci. The values include things like elevation, concentrations, temperatures, etc.
- SpatialEstimate works by identifying a global trend model and a local variation model.
- The local variations part is defined to minimize the expected prediction error
where
is the true value and and
is the predicted value.
- There are two parts to the local variations. The VariogramFunction describes how much the value at a location is affected by nearby values, and the SpatialNoiseLevel describes how much noise there is in measurements of the values.
- With zero noise variance, the predictor function will interpolate through the given values. With nonzero noise variance, the predictor function will approximate the given values but not interpolate and effectively smooth out the surface. The SpatialNoiseLevel effectively gives a way to control the level of smoothing in the resulting SpatialEstimatorFunction.
- The locations loci can have the forms:
-
{p1,…,pd} geometrical locations GeoPosition[…],GeoPositionENU[…],… geographical locations - The values vali can be real numeric values or quantities.
- The following options can be given:
-
SpatialTrendFunction Automatic global trend model VariogramFunction Automatic local variation model SpatialNoiseLevel Automatic noise level in vali



Examples
open allclose allBasic Examples (3)Summary of the most common use cases
SpatialEstimate computes a continuous function for sparse values given with locations:

https://wolfram.com/xid/0e47wo95payinu-s63tpq

https://wolfram.com/xid/0e47wo95payinu-7voh5k


https://wolfram.com/xid/0e47wo95payinu-v00lz

Compute estimated value at a location:

https://wolfram.com/xid/0e47wo95payinu-6kpc0x


https://wolfram.com/xid/0e47wo95payinu-jjh6oy

Create a continuous spatial estimator function to visualize density:

https://wolfram.com/xid/0e47wo95payinu-o9t0ul

https://wolfram.com/xid/0e47wo95payinu-md9gpx

Create spatial estimator function with constant trend:

https://wolfram.com/xid/0e47wo95payinu-slswxv

Visualize spatial estimator function in the observation region inferred from the locations:

https://wolfram.com/xid/0e47wo95payinu-5un7sx

Rainfall amounts at locations in Switzerland:

https://wolfram.com/xid/0e47wo95payinu-1snoqc

https://wolfram.com/xid/0e47wo95payinu-2vwxyx

Create spatial estimator function with linear trend:

https://wolfram.com/xid/0e47wo95payinu-bc7k4l

Evaluate spatial estimator function at uniform random locations in the observation region:

https://wolfram.com/xid/0e47wo95payinu-04lsla

https://wolfram.com/xid/0e47wo95payinu-t2s8dg

Scope (2)Survey of the scope of standard use cases
Create spatial estimator for random data:

https://wolfram.com/xid/0e47wo95payinu-da0qam
Define a variogram model to use:

https://wolfram.com/xid/0e47wo95payinu-fhtvtg

Create spatial estimator function with the variogram model and quadratic trend:

https://wolfram.com/xid/0e47wo95payinu-ber06d


https://wolfram.com/xid/0e47wo95payinu-otj9v

Use SpatialEstimate with specified variogram function:

https://wolfram.com/xid/0e47wo95payinu-cxa6ko

https://wolfram.com/xid/0e47wo95payinu-gdn84s

Create spatial estimator function with linear trend:

https://wolfram.com/xid/0e47wo95payinu-eg5usm

Find the variogram model used:

https://wolfram.com/xid/0e47wo95payinu-pkhi9n


https://wolfram.com/xid/0e47wo95payinu-cope7a


https://wolfram.com/xid/0e47wo95payinu-fi8ayn

Compute the estimator functions with the fitted variogram model:

https://wolfram.com/xid/0e47wo95payinu-foxvg

Compare the estimator surfaces of the two variogram models:

https://wolfram.com/xid/0e47wo95payinu-f9pp3x

Options (4)Common values & functionality for each option
SpatialNoiseLevel (1)
Specify noise level using SpatialNoiseLevel:

https://wolfram.com/xid/0e47wo95payinu-d3z84
Create spatial estimator function with positive noise level:

https://wolfram.com/xid/0e47wo95payinu-gl2p8a


https://wolfram.com/xid/0e47wo95payinu-ziijr

If the noise level is 0, SpatialEstimate interpolates exactly:

https://wolfram.com/xid/0e47wo95payinu-z07f8


https://wolfram.com/xid/0e47wo95payinu-eew2c

SpatialTrendFunction (1)
Specify trend function using SpatialTrendFunction:

https://wolfram.com/xid/0e47wo95payinu-t5zjxn

https://wolfram.com/xid/0e47wo95payinu-vyyzkh

Create spatial estimator function with constant trend:

https://wolfram.com/xid/0e47wo95payinu-xobu7h


https://wolfram.com/xid/0e47wo95payinu-o694pc

Create spatial estimator function with quadratic trend:

https://wolfram.com/xid/0e47wo95payinu-t6ndvn


https://wolfram.com/xid/0e47wo95payinu-9rnqat

VariogramFunction (1)
Specify variogram model using VariogramFunction:

https://wolfram.com/xid/0e47wo95payinu-yxuut6
Create spatial estimator function with an exponential variogram model:

https://wolfram.com/xid/0e47wo95payinu-0ho5w9


https://wolfram.com/xid/0e47wo95payinu-57l4x6

Use pre-fitted VariogramModel:

https://wolfram.com/xid/0e47wo95payinu-debtm8


https://wolfram.com/xid/0e47wo95payinu-6cp56r


https://wolfram.com/xid/0e47wo95payinu-7ykix9

DistanceFunction (1)
Specify a distance function using DistanceFunction:

https://wolfram.com/xid/0e47wo95payinu-jf8eoc
Create a spatial estimator function with constant trend:

https://wolfram.com/xid/0e47wo95payinu-b64nkp


https://wolfram.com/xid/0e47wo95payinu-lrx9f

Applications (4)Sample problems that can be solved with this function
Often spatial data is given on a regular grid with missing regions, for example, in satellite ozone readings:

https://wolfram.com/xid/0e47wo95payinu-5256rf

https://wolfram.com/xid/0e47wo95payinu-6y0v91

https://wolfram.com/xid/0e47wo95payinu-f7f4pn

Create a continuous spatial estimator:

https://wolfram.com/xid/0e47wo95payinu-lox6sw

Find the estimated ozone value for a specific location:

https://wolfram.com/xid/0e47wo95payinu-tua53t

Evaluate the spatial estimator function at uniform random locations in the observation region:

https://wolfram.com/xid/0e47wo95payinu-xzuli5

https://wolfram.com/xid/0e47wo95payinu-txeflo


https://wolfram.com/xid/0e47wo95payinu-laqpzw

Use SpatialEstimate to create a continuous estimate from sparse observation locations:

https://wolfram.com/xid/0e47wo95payinu-6u8zor


https://wolfram.com/xid/0e47wo95payinu-tw74ri

Compute estimates using specific models:

https://wolfram.com/xid/0e47wo95payinu-6xlag2

https://wolfram.com/xid/0e47wo95payinu-t2mtbn
Create a set of random points and compute the estimated values at these locations:

https://wolfram.com/xid/0e47wo95payinu-55lkd
Visualize rainfall values over the whole region:

https://wolfram.com/xid/0e47wo95payinu-7lp199

SpatialEstimate can create a smoother picture of the data:

https://wolfram.com/xid/0e47wo95payinu-wrkd
Standard ways to visualize the data:

https://wolfram.com/xid/0e47wo95payinu-jjrqpm

Spatial estimate with smoothing:

https://wolfram.com/xid/0e47wo95payinu-bgpomb
Compute estimates for random locations:

https://wolfram.com/xid/0e47wo95payinu-kyyrr5

https://wolfram.com/xid/0e47wo95payinu-cxqan4

https://wolfram.com/xid/0e47wo95payinu-ly7fwe

Compute an estimate of the yield of the entire field:

https://wolfram.com/xid/0e47wo95payinu-hnm0bb

Locations of scallop samples in the Atlantic Ocean, annotated with the total number of specimens caught as well as pre-recruit and adult numbers:

https://wolfram.com/xid/0e47wo95payinu-ckl4z


https://wolfram.com/xid/0e47wo95payinu-vzcbms

Extract the spatial point data:

https://wolfram.com/xid/0e47wo95payinu-b3m1dc

First select locations with positive catch numbers:

https://wolfram.com/xid/0e47wo95payinu-gflfqe
Compute rate of recruits relative to the catch size:

https://wolfram.com/xid/0e47wo95payinu-xf8a0b
Use SpatialEstimate to create an estimate of recruit rates from sparse catch locations:

https://wolfram.com/xid/0e47wo95payinu-fh77ip

Create a set of random points and compute the estimated values at these locations:

https://wolfram.com/xid/0e47wo95payinu-ed7ys7
Visualize the recruit rates over the whole observation region:

https://wolfram.com/xid/0e47wo95payinu-qe5rim

Properties & Relations (2)Properties of the function, and connections to other functions
For large spatial noise levels, the spatial estimator converges to the trend function:

https://wolfram.com/xid/0e47wo95payinu-fvg62s

https://wolfram.com/xid/0e47wo95payinu-jlusnm

Compute SpatialEstimate for increasing values of noise level for specified polynomial trend order:

https://wolfram.com/xid/0e47wo95payinu-j78kx0

https://wolfram.com/xid/0e47wo95payinu-u8fk2b

Only with zero SpatialNoiseLevel is SpatialEstimate an exact interpolator:

https://wolfram.com/xid/0e47wo95payinu-vehh1c

https://wolfram.com/xid/0e47wo95payinu-e6x22h

Compute spatial estimate for varying values of spatial noise level:

https://wolfram.com/xid/0e47wo95payinu-m1em2o

https://wolfram.com/xid/0e47wo95payinu-j87b37

https://wolfram.com/xid/0e47wo95payinu-c9qr3n
Visualize the estimates with the data:

https://wolfram.com/xid/0e47wo95payinu-uikzc9

Possible Issues (1)Common pitfalls and unexpected behavior
Some variograms can be badly conditioned:

https://wolfram.com/xid/0e47wo95payinu-kvheb1

https://wolfram.com/xid/0e47wo95payinu-lginfa
The result does not represent the data well:

https://wolfram.com/xid/0e47wo95payinu-y2rlvv

Allowing positive SpatialNoiseLevel acts as a regularization:

https://wolfram.com/xid/0e47wo95payinu-3c4yk1
The noise level is computed automatically:

https://wolfram.com/xid/0e47wo95payinu-uw953y


https://wolfram.com/xid/0e47wo95payinu-h04lix

Neat Examples (1)Surprising or curious use cases
The population data of countries in Europe:

https://wolfram.com/xid/0e47wo95payinu-7bmb4y


https://wolfram.com/xid/0e47wo95payinu-zzbed8

https://wolfram.com/xid/0e47wo95payinu-badi1s

Find estimator surface with an exponential variogram model and two different trend models:

https://wolfram.com/xid/0e47wo95payinu-cjwwvq


https://wolfram.com/xid/0e47wo95payinu-c4uz7j


https://wolfram.com/xid/0e47wo95payinu-z1y6e


https://wolfram.com/xid/0e47wo95payinu-ca7bwc

Wolfram Research (2021), SpatialEstimate, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialEstimate.html.
Text
Wolfram Research (2021), SpatialEstimate, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialEstimate.html.
Wolfram Research (2021), SpatialEstimate, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialEstimate.html.
CMS
Wolfram Language. 2021. "SpatialEstimate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SpatialEstimate.html.
Wolfram Language. 2021. "SpatialEstimate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SpatialEstimate.html.
APA
Wolfram Language. (2021). SpatialEstimate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpatialEstimate.html
Wolfram Language. (2021). SpatialEstimate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpatialEstimate.html
BibTeX
@misc{reference.wolfram_2025_spatialestimate, author="Wolfram Research", title="{SpatialEstimate}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/SpatialEstimate.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_spatialestimate, organization={Wolfram Research}, title={SpatialEstimate}, year={2021}, url={https://reference.wolfram.com/language/ref/SpatialEstimate.html}, note=[Accessed: 26-March-2025
]}