[GIS] Spatio-temporal block kriging with R package gstat

gstatinterpolationkrigingrspatial statistics

In the documentation of sp I saw that the coords argument of the SpatialPolygons function only accepts 2 columns. Is it not possible to create 3-dimensional polygons? I am doing spatio-temporal kriging using package gstat by adding time as a third spatial dimension of a SpatialPointsDataFrame. I would like to extend that to block kriging with polygons as blocks. Is there any way to do that?

Best Answer

In sp, SpatialPoints*, SpatialPixels* and SpatialGrid* (with * omitted or replaced by DataFrame) do support more than 2 spatial dimensions, as OP has done, but SpatialPolygons* and SpatialLines* do not. With gstat you can do 3-D block kriging with 3-D blocks (using block = c(10,10,10)), but you cannot do this for non-rectangular blocks, as OP wants. It is perfectly OK to substitute time for the third dimension, but you are constrained to the metric ST variogram.

library(gstat)
vignette("st")

gives you more options for variogram models, but not for predicting block mean values (this is FYI, not an answer to the question).

The only answer to the question would be to do 3D conditional simulations, and aggregate point values over your arbitrary 3D (2D polygon + time extent) blocks. Tedious, but possible; also only along the 3D path, not along the path described in the ST vignette (krigeST does not do simulation - yet!).