Estimating the spatial correlations is an important part of geostatistics.
These spatial correlations can be expressed by the variogram, which can be
estimated with the subpackage gstools.variogram
. The variograms can be
estimated on structured and unstructured grids.
See Wikipedia: (semi-)variogram.