s.surf.tps manual page

(click on highlighted words to view images, animations and references)

s.surf.tps - interpolation and topographic analysis from given site data to GRASS raster format using regularized spline with tension

SYNOPSIS

s.surf.tps

s.surf.tps help

s.surf.tps [-d] input = name elev = name [ slope = name] [ aspect = name] [ pcurv = name] [ tcurv = name] [ mcurv = name] [ maskmap = name] [ dmin1 = val] [ zmult = val] [ tension = val] [ smooth = val] [ segmax = val] [ npmin = val] [ devi = name] [ treefile = name] [ overfile = name]


DESCRIPTION

s.surf.tps interpolates the values from point data (measured elevations, climatic stations, drill holes etc.) given in a sites file named input to grid cells. Output raster file is elev representing elevation surface. As an option, simultaneously with interpolation, topographic parameters slope, aspect, profile curvature (measured in the direction of steepest slope), tangential curvature (measured in the direction of a tangent to contour line) or mean curvature are computed and saved as raster files as specified by the options slope, aspect, pcurv, tcurv, mcurv respectively. If -d flag is set the program outputs partial derivatives fx,fy,fxx, fxy,fyy instead of slope, aspect and curvatures.

User can define a raster file named maskmap, which will be used as a mask. The interpolation is skipped for cells which have zero value in mask. Zero values will be assigned to these cells in all output raster files.

Data points are checked for identical points and points that are closer to each other than given dmin1 are removed (this is necessary especially for digitized contours). Parameter zmult allows user to rescale the z-values for sites (useful e.g. for transformation of elevations given in feet to meters, so that the proper values of slopes and curvatures can be computed).

Regularized spline with tension is used for the interpolation. The tension parameter tunes the character of the resulting surface from thin plate to membrane

Changing Tension Parameter

Higher values of tension parameter reduce the overshoots that can appear in surfaces with rapid change of gradient (see suggested values for different types of surfaces given in notes).

For noisy data, it is possible to define a smoothing parameter, smooth.

Changing Smoothing Parameter

With the smoothing parameter set to zero (smooth=0) the resulting surface passes exactly through the data points. When smoothing parameter is used, it is possible to output site file devi containing deviations resulting from smoothing.

If the number of given points is greater than segmax, segmented processing is used . The region is split into rectangular segments, each having less than segmax points and interpolation is performed on each segment of the region. To ensure the smooth connection of segments the interpolation function for each segment is computed using the points in given segment and the points in its neighborhood which are in the rectangular window surrounding the given segment. The number of points taken for interpolation is controlled by npmin, the value of which must be larger than segmax . The program writes important values related to the computation to history file of raster map elev. User can choose to output vector files treefile and overfile which represent quad tree used for segmentation and overlapping neighborhoods from which additional points for interpolation on each segment were taken.

OPTIONS

The user can run this program either interactively or non-interactively. The program will be run non-interactively if the user specifies program arguments and flag settings on the command line using the form:

s.surf.tps [-d] input = name elev = name [ slope = name] [ aspect = name] [ pcurv = name] [ tcurv = name] [ mcurv = name] [ maskmap = name] [ dmin1 = val] [ zmult = val] [ tension = val] [ smooth = val] [ segmax = val] [ npmin = val] [ devi = name] [ treefile = name] [ overfile = name]

Alternately, the user can simply type s.surf.tps on the command line without program arguments. In this case, the user will be prompted for parameter values and flag settings using the standard GRASS parser interface described in the manual entry for parser.

Parameters:

-d Output partial derivatives instead of aspect, slope and curvatures.

input = name

Use the existing site file name as input.

elev = name

Output elevation values to raster file name.

slope = name

Output slope values to raster file name.

aspect = name

Output aspect values to raster file name.

pcurv = name

Output profile curvature values to raster file name.

tcurv = name

Output tangential curvature values to raster file name.

mcurv = name

Output mean curvature values to raster file name.

maskmap = name

Use the existing raster file name as a mask.

dmin1 = val

Set min distance between points to val. Default value is set to 0.5 grid cell size.

zmult = val

Convert z-values using conversion factor val. Default value is 1.

tension =val

Set tension to val. Default value is 40, appropriate for smooth surfaces.

smooth = val

Set smoothing parameter to val. Default value is 0.1.

segmax = val

Set max number of points per segment to val. Default value is 40.

npmin =

Set min number of points for interpolation to val. Default value is 200, for data with heterogeneous spatial distribution higher value is suggested (see notes).

devi = name

Output deviations to a site file name. (Used for smoothed surfaces)

treefile = name

Output quad tree used for segmentation to vector file name

overfile = name

Output overlapping neighborhoods used for segmentation to vector file name.

NOTES

s.surf.tps uses regularized spline with tension for interpolation from point data. The implementation has an improved segmentation procedure based on quadtrees which enhances the efficiency for large data sets. Special color tables are created by the program for output raster files.

Topographic parameters are computed directly from the interpolation function so that the important relationships between these parameters are preserved. The equations for computation of these parameters and their interpretation is described in (Mitasova and Hofierka 1993). Slopes and aspect are computed in degrees (0-90 and 1-360 respectively). The aspect raster file has value 0 assigned to flat areas (with slope less than 0.1%) and to singular points with undefined aspect. Aspect points downslope and is 90 to the North, 180 to the West, 270 to the South and 360 to the East, the values increase counterclockwise. Curvatures are positive for convex and negative for concave areas. Original values of curvatures are multiplied by 100000, to conform with GRASS integer raster files. Therefore any curvature lower than 0.00001 will be zero. Flat areas have zero curvatures and singular points have codes 1000000, 2000000, 3000000 for peak, pit and saddle respectively. We suggest to use these codes only to distinguish areas(grid cells) with undefined curvature as the codes are assigned using the theorems from differential geometry but have never been tested.

The program gives warning when significant overshoots appear and higher tension should be used. However, with tension too high the resulting surface changes its behavior to membrane (rubber sheet stretched over the data points resulting in a peak or pit in each given point and everywhere else the surface goes rapidly to trend). Smoothing can also be used to reduce the overshoots if the resulting surface should be smooth.

For data with values changing over several magnitudes (sometimes the concentration or density data) it is suggested to interpolate the log of the values rather than the original ones.

The program checks the numerical stability of the algorithm by computation of values in given points, and prints the maximum difference found into history file of raster map elev. Significant increase in tension is suggested if the difference is unacceptable. For computation with smoothing set to 0 this difference should be 0. With smoothing parameter greater than zero the surface will not pass through the data points and the higher the parameter the closer the surface will be to the trend. The maximum difference between the given and approximated value in this case reflects the maximum smoothing effect on data. For theory on smoothing with splines and their statistical interpretation see Talmi and Gilat, 1977, Wahba, 1990 and Hutchinson, 1993, where you can find also a comparison of smoothing splines with kriging.

The program writes the values of parameters used in computation into the comment part of history file elev as well as the following values which help to evaluate the results and choose the suitable parameters: minimum and maximum z values in the data file (zmin_data, zmax_data) and in the interpolated raster map (zmin_int, zmax_int), maximum difference between the given and interpolated z value in a given point (errtotal), rescaling parameter used for normalization (dnorm), which influences the tension (see Mitasova, 1992; Mitasova and Mitas, 1993).

If visible connection of segments appears, the program should be rerun with higher npmin to get more points from the neighborhood of given segment. .

When the number of points in a site file is not too large, the user can skip segmentation by setting segmax to the number of data points. .

The program gives warning when user wants to interpolate outside the rectangle given by minimum and maximum coordinates in site file, zoom into the area where the points are is suggested in this case. .

When a mask is used, the program takes all points in the given region for interpolation, including those in the area which is masked out, to ensure proper interpolation along the border of the mask. It therefore does not mask out the data points, if this is desirable, it must be done outside s.surf.tps. The program was used for various applications with the following parameters :


interpolation of DEM from digitized contours

tension 20. - 80.

smoothing 0.01 - 1.0

segmax 40

npmin 200 - 300

(low tension was used for relatively flat terrain, high tension was necessary for terrain with sharp changes in slope, low value of smoothing is usually sufficient for dense and accurately digitized contours, for less dense and not very carefully digitized contours, higher smoothing is suggested)


interpolation of precipitation from climatic stations

tension 40. - 150.

smoothing 0. - 2.

segmax 40

npmin 150


interpolation of concentration of chemicals

tension 20. - 80.

smoothing 0. - 5.

The user must run g.region before the program to set the region and resolution for interpolation.


SEE ALSO

r.slope.aspect r.surf.idw r.surf.idw2, r.surf.contour s.surf.idw v.to.sites.b v.to.sites g.region v.surf.tps, r.surf.sor, r.resample.tps


AUTHOR

Original version of program (in FORTRAN):

Lubos Mitas, NCSA, University of Illinois at Urbana Champaign, Illinois, and Institute of Physics, Bratislava, Czechoslovakia

Helena Mitasova, Department of Geography, University of Illinois at Urbana-Champaign, and US Army CERL, Champaign, Illinois

Modified program (translated to C, adapted for GRASS, new segmentation procedure):

Irina Kosinovsky, US Army CERL

Dave Gerdes, US Army CERL


REFERENCES

Hutchinson, M. K. and Gessler, P. E., 1993 : Splines - more than just a smooth interpolator, Geoderma ,1993.

Mitasova and Mitas 1993: Interpolation by Regularized Spline with Tension: I. Theory and Implementation, Mathematical Geology ,25, 641-655.

Mitasova and Hofierka 1993: Interpolation by Regularized Spline with Tension: II. Application to Terrain Modeling and Surface Geometry Analysis, Mathematical Geology 25, 657-667.

Mitasova, H., 1992 : New capabilities for interpolation and topographic analysis in GRASS, GRASSclippings, v.6, No.2 (summer), p.13.

Mitas, L., Mitasova H., 1988 : General variational approach to the interpolation problem, Computers and Mathematics with Applications, v.16, p. 983

Mitasova, H., 1992 : Surfaces and modeling, GRASSclippings, v.6, No.3 (winter), p.16-18.

Talmi, A. and Gilat, G., 1977 : Method for Smooth Approximation of Data, Journal of Computational Physics, 23, p.93-123.

Wahba, G., 1990, : Spline Models for Observational Data, CNMS-NSF Regional Conference series in applied mathematics, 59, SIAM, Philadelphia, Pennsylvania.


GMSL_VIZ_ICON GMSL Modeling & Visualization
Home Page