I have a grid/raster file, interpolated using triangulation method in Surfer (Golden Software). When I contour the file (either in Surfer or QGIS), the contours are basically identical.

I have a point file (x,y) and I use it to read raster values at the point locations. If I use 'grid residual' function in Surfer, I get different values than if I use 'point sampling tool' in QGIS.

When I create a new raster from sampled xyz file, the raster obtained from point sampled QGIS data is not 'smooth'. The raster obtained from Surfer grid residuals is fine. To compare the contours - see figure below. The black contours are from point sampled file (QGIS), the red, smooth contours are from Surfer (grid residuals).

Comparison of contours - QGIS - black line, Surfer - red line

More details here (including some background on the interpolation of the original raster): Point sampling - QGIS vs Surfer

My questions are basically variation on the same theme:

1) Why is there a difference between QGIS point sampling tool and Surfer grid residuals?
2) How does the actual raster sampling work if the sampling point is not at the centre of the raster cell?
3) Is Surfer somehow smoothing the data?
4) Is the problem with my original raster - interpolation method, raster cell size? Should I be analysing the data before I interpolate it?
5) Anybody else had similar issues? Do you manage to deal with them in QGIS?


After a bit of asking around, this information came back to me:

Point sampling tool (QGIS) does exactly that: samples a raster. If the sampling point is distant from the center of the raster cell, the value it returns does not represent the 'real' surface.

Surfer (Grid residuals function) actually returns value interpolated between raster cell centres. To quote the Golden Software newsletter (Newsletter 51): “Surfer uses a bilinear interpolation method to calculate Z values at points that do not coincide with grid nodes”.

If I want to achieve similar results in QGIS and Surfer, it is possible either: a) use really small raster cell size (back to the problem of data analysis before interpolation) or b) use 'Raster interpolation' plugin in QGIS (Raster interpolation web page).

Not the answer you're looking for? Browse other questions tagged or ask your own question.