I am trying to generate a raster with many pixels (10240x10240) using the gdal_grid tool but I have problems choosing the right interpolation algorithm.

I have a dataset with varying point density (ie some places have a lot of points, others have fewer).

  • With the invdist algorithm, I have "false" results because points far away from a pixel can influence it too much due to their greastest density
  • I tried to use the radius1, radius2 and max_points parameters, but it seems gdal does not take the closest ones, so the result in meaningless (for my case)
  • Using the invdistnn algorithm seems to be the solution, but there is no smoothing paramter here which I need because points have a non negligible dispertion.

(I know I could increase the data density artificially where points are missing, but then the computation time becomes very high so this is a solution I would not like to go with.)

Is there a solution to use a smoothing with the invdistnn algorithm ?

I am using GDAL 2.1

  • Invdist seems to have parameter for smoothing gdal.org/gdal_grid.html. – user30184 Feb 21 '17 at 21:16
  • Yes, invdist does, but not invdistnn, which I need since I want only the closest points to be taken into account (at least, this is my understanding :) ) – Estelle Scifo Feb 21 '17 at 21:18
  • It does seem to have a smooth feature documented but doesn't seem to work. Could be a bug. – four43 Jul 12 '17 at 16:16
  • smoothing with invdistnn has been implemented in GDAL 2.2. If not working, sounds like a bug indeed, but at least for my use case it works. – Estelle Scifo Jul 13 '17 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.