I have points scattered around some origin point, each with a score. The score should be zero at the origin (similar to distance). I want to generate smooth contour lines from these points.

points with values around an origin

The red numbers are the score for a particular point, the blue icon is the origin.

I tried the Contour tool (from vector) and the result is far too jagged. Next I tried IDW Interpolation with a relaxed distance coefficient (p=2, max is 100). The result is closer to what I want, but still a bit overfit.

enter image description here

I'm considering removing the far-away point to the south and expanding the extent with a template polygon. Any other recommendations for making this look better?

EDIT: Wanted to mention I tried a lot of other methods too. Heatmap KDE offers a way to scale the radius by my score in addition to the heatmap weights. I'm curious how this works. Is the radius used for the gaussian kernel selectively larger for those points with a larger score? How is this different than for the weight?

  • Have you tried using the Contour plugin? – Joseph Feb 14 at 11:21

I would like to suggest Multileve B-spline Interpolation tool in Processing Toolbox > SAGA > Raster creation tools.

enter image description here

  • This looks pretty good, thanks! I managed something similar with IDW Interpolation. The advantage there is you can specify contour intervals. In this case, it requires trial and error toggling the "maximum level." I'll post my own answer when I have time. – Wassadamo Feb 14 at 19:03
  • 1
    @Wassadamo That's good. Just to avoid any unnecessary misunderstanding, Maximum Level is a factor to control B-spline matrix size and it does not have direct relationship with contour interval. Usually I use 10-12. If we set it higher it increases the memory usage in the calculation. – Kazuhito Feb 14 at 21:50

Your Answer

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

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