I want to interpolate height (Z) values in a raster layer. The problem is that there is a body of water with no data in the middle of it and the overall area is not square; so also no data around. Is it possible to only interpolate the values that are "on the terrain" ? I am working with QGIS 3.24.

This is what the raster looks like; the orange area is (roughly) where I would like to interpolate: enter image description here

  • which interpolation tool are you using? Also, what have you tried that failed?
    – PyMapr
    Commented Jun 9, 2022 at 14:05
  • I tried GRASS raster tools: r.resamp.bspline, r.resamp.rst, r.resamp.interp and r.series.interp but it either gives an error or generates an empty layer. The interpolation tools from Qgis are for vector layer, and I am not really sure of what I am doing here.
    – tukanium
    Commented Jun 9, 2022 at 14:21
  • If you want to post the GRASS commands that you used, we night be able to help. GRASS has a very useful masking capability. So if you import your "orange" polygon into GRASS and set a mask based on that polygon, then the interpolation algorithm - which ever you choose- will be applied only to that masked area.
    – Micha
    Commented Jun 11, 2022 at 14:59

1 Answer 1


If the elevation points you are using are all located within the orange polygon as it seems, you can run any interpolation you like (TIN, IDW) and then clip (Processing Tools -> GDAL -> Raster Extraction -> Clip raster by extent OR Clip raster by mask layer) the result raster using the extents of your orange polygon. The interpolated values within your orange polygon are correct and you don't need the ones outside so it's ok to delete them.

  • I though about this, except: - which interpolation tool should I use ? - and I don't actually have a correct border extent (orange)
    – tukanium
    Commented Jun 9, 2022 at 14:24
  • You mainly have two tools directly embedded in QGIS, IDW and TIN interpolation (Processing Toolbox -> Interpolation) which are both very intuitive to use. You just need to chose the attribute to interpolate (in your case the elevation) and the resolution (cell size) of your output grid. Both give very different results so it's just a matter of checking your output raster looks sensible to you.
    – Sken2107
    Commented Jun 9, 2022 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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