RST Spline Surfaces: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
Line 30: Line 30:


The RST modules work best with an even distribution of starting points. Contour line vertices tend to be highly packed along lines with huge gaps in between different lines. Not very evenly distributed! This will usually lead to segmentation problems (see troubleshooting section below). Some solutions are offered at the following link, demonstrating the use of the v.generalize module to remove vertices from the contour lines:
The RST modules work best with an even distribution of starting points. Contour line vertices tend to be highly packed along lines with huge gaps in between different lines. Not very evenly distributed! This will usually lead to segmentation problems (see troubleshooting section below). Some solutions are offered at the following link, demonstrating the use of the v.generalize module to remove vertices from the contour lines:
http://skagit.meas.ncsu.edu/~helena/grasswork/interpgen.html
: http://skagit.meas.ncsu.edu/~helena/grasswork/interpgen.html


You may prefer to try the r.surf.contour or add-on r.surf.nnbathy modules if starting with contour line data.
You may prefer to try the r.surf.contour or add-on r.surf.nnbathy modules if starting with contour line data.

Revision as of 07:51, 10 June 2008

RST: Regularized Spline with Tension

Overview

Thin plate splines fit a surface to a series of points by minimizing the energy it takes to "bend" the surface. You can think of it as stretching a rubber sheet between all the points and then varying the stiffness of the sheet.

Using this method you can create raster surfaces which, as compared to a simple rasterization method like a sampled TIN, better match the true topography, work better results from groundwater flow modules, and create much nicer visualization images.

Modules

  • v.surf.rst
  • v.vol.rst
  • r.resamp.rst
  • librst
  • r.fillnulls

Tuning parameters

  • See the module help pages
(TODO: write user guide)

Validation

  • Cross-validation
(TODO: write How-to)
See manual page of v.surf.rst
See C-V script: http://www.grassbook.org/examples_menu3rd.php (Script to perform cross validation in GRASS/RST splines interpolation) for parametrisation


Working with contour lines

The RST modules work best with an even distribution of starting points. Contour line vertices tend to be highly packed along lines with huge gaps in between different lines. Not very evenly distributed! This will usually lead to segmentation problems (see troubleshooting section below). Some solutions are offered at the following link, demonstrating the use of the v.generalize module to remove vertices from the contour lines:

http://skagit.meas.ncsu.edu/~helena/grasswork/interpgen.html

You may prefer to try the r.surf.contour or add-on r.surf.nnbathy modules if starting with contour line data.

Troubleshooting

  • If your input data points include a dramatic change in point density across the region of interest you may get square artifacts in the output map. This is especially visible in a slope map or in contour lines created from the elev map with r.contour.
Solution 1: increase the npmin parameter
Solution 2: Create the surface in multiple passes. First isolate the low density points and use v.hull to make a polygon around them. Next run v.surf.rst for those points to make a smooth surface between them. Then you can either run v.to.rast on the hull area and create new random points with the r.random module, or sample the new surface with the v.random.cover addon script. Finally use v.patch to create a new points file with a less dramatic change in point density.
  • Spline surfaces do not handle hard breaks in the topography very well, such as found on a beach at the base of a cliff. "Ringing" may be introduced and the module may complain about "overshoots", as the surface is bent away from an input point further than the module is happy with. Users familiar with digital electronics may recall the similar problem of fitting a sinusoid to a square wave.