Before anyone marks this as a duplicate, hear me out. This question:

Interpolation: irregular shape, merging DEM's

asks my question but not for QGIS. Furthermore, the answer is vague and not entirely useful. That being said...

My problem is simple. I have xyz data for a river. The river is curved, and I would like to produce a bathymetric map of the bottom. Interpolation is the (nearly) perfect tool. I struggle to get maps that do not highlight the actual data points. The blending is quite poor, and I think this is because the interpolation is happening on a square, or a polygon, depending on which method of interpolation in QGIS you use. The tool does not know that the area of interest is a strange and specific shape!

Is there any way or plugin to tell QGIS to focus the interpolation from a line (which I would draw down the center of the river, or a polygon, (which I could draw outlining the river) in order to interpolate in a very specific area?

I do not want to use a polygon to clip my interpolation result. It is extremely close to what I want but I feel like the rest of the interpolation that I do not want is affecting the river.

I have a feeling GRASS can do this. If someone can confirm this and tell me the function I will learn how to use GRASS (although I'm kind of scared of it). If there is a function or plugin in QGIS that would be awesome. Thanks for the help people!


Adding this image to help with a comment I made. Demonstrates the problem and also another issue with the actual path of the sensor being too visible. enter image description here


GRASS can do what you're asking.

Here's how I would approach the mssion:

First get or digitize the banks of the river as a (long, winding) polygon. Then import your xyz data as a point vector (v.in.ascii), and your river polygon in the appropriate GRASS location/mapset with v.in.ogr.

Now you'll have to think about the region settings with g.region . You need to set a resolution that relects how accurate you want the bathymetric layer to be. And be sure that the region extents cover the whole stretch of the river that you are working with.

Now convert your river polygon to a raster layer (v.to.rast), and use r.mask to make it into a mask layer so that the next interolation step works only on the river area.

And now choose which of the several interpolation modules suits your needs. The basic v.surf.idw implements "Inverse Distance Weighting" which usually has the resulting surface going exactly thru the original points. On the other hand v.surf.rst (Regularized Spline with Tension) does smoothing of the measured points, and is often better for terrain interpolation.

  • Interesting. In coloring the terrain afterward (Will be attempting this in a bit) will I have the same problem I have with normal QGIS with the my points being highlighted too much? I am going to add an image to my post to demonstrate this. – BobbyEK Oct 10 '14 at 21:38
  • @BobbyEK Bobby, if the IDW interpolator is emphasizing your data points too heavily then that is simply a matter with experimenting with different (lower) values of the exponent parameter until you get a satisfactory surface. – WhiteboxDev Oct 12 '14 at 12:43
  • @Micha, I've got to give you the correct answer. I started up GRASS and everything was pretty straight forward. Figured it out easily. However, with my version of QGIS 2.4, nviz (the thing that lets me view in 3D) is not working. So I am moving on to standalone GRASS. Thanks for the help! – BobbyEK Oct 16 '14 at 15:20

You might like to check out one of the presentations at FOSS4GIS 2014 titled " Open Source Work-flow for Surface Interpolation with Curvilinear Anisotropy — Michele Tobias, University of California Davis."


  • That was interesting, way over my head at the moment though. It seems like I could copy her process but I wouldn't understand it. Thanks for the link – BobbyEK Oct 10 '14 at 23:18

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.