Search code examples
pythoninterpolationspatialkriging

Spatial interpolation with kriging or nearest neighbor method?


This is an open question concerning interpolation of data.

My starting point is a couple hundred XYZ points that unevenly spaced, i.e. a point cloud.

I want to use kriging to give the Z values to the points in the area defined by

gridx = np.arange(0.0,300,20)

and

gridy = np.arange(0.0,300,20)

I want to be able to smooth the curves as needed. I have had success with the nearest neighbor in the past in ArcGIS but I am sure there is also a method to do this in python. I have tried using PyKrige but found there wasn't much I could tweak and the slopes were abruptly reverting back to the average Z value.

Best regards,

Phil


Solution

  • You can rather use scikit-learn which contains a python version of DACE, the popular kriging algorithm initially implemented in Matlab.

    Plenty of other algorithms are also available for regression/interpolation, clustering, etc.