Yesterday, I try after a long time to make an IDW interpolation on a point layer in Qgis 2.18 with SAGA tools. I use same parameters as before on Qgis 2.14, but the result is quite different. Raster isn't smooth and all points are very visible on it.
Has SAGA IDW interpolation has been changed between these 2 versions?
Best Answer
You can see distance-based interpolation formula in following link:
http://www.gitta.info/ContiSpatVar/en/html/Interpolatio_learningObject2.xhtml
where p is distance weighting exponent and it probably was the parameter that is different between these 2 SAGA versions.
So, it's relatively easy to code this algorithm in PyQGIS. As follow, it has inside three arbitrary points to be interpolated and it was used a five points layer as base of interpolation.
Used layers look as at following image where green points will be interpolated and blue points have z values.
After running code at Python Console of QGIS I got:
where it can be observed that obtained values are similar to neighbors.
However, it's more useful when above algorithm was coded in my own IDW plugin to get a complete raster (perfectly aligned with base raster). In following composition I used 25 points and p different values (0.1, 0.5 and 2). It can be observed that p parameter is a smoothed factor.
By the way, my results are identical to obtained with IDW QGIS tool; except my interpolated rasters were perfectly aligned with base raster.