1v.vol.rst(1)                  Grass User's Manual                 v.vol.rst(1)
2
3
4

NAME

6       v.vol.rst   -  Interpolates point data to a G3D grid volume using regu‐
7       larized spline with tension (RST) algorithm.
8

KEYWORDS

10       vector
11

SYNOPSIS

13       v.vol.rst
14       v.vol.rst help
15       v.vol.rst  [-c]   input=string    [cellinp=string]     [wcolumn=string]
16       [tension=float]   [smooth=float]   [scolumn=string]   [where=sql_query]
17       [devi=string]    [cvdev=string]    [maskmap=string]    [segmax=integer]
18       [npmin=integer]   [dmin=float]   [wmult=float]   [zmult=float]   [cell‐
19       out=string]    [elev=string]     [gradient=string]     [aspect1=string]
20       [aspect2=string]     [ncurv=string]    [gcurv=string]    [mcurv=string]
21       [--overwrite]  [--verbose]  [--quiet]
22
23   Flags:
24       -c
25           Perform a cross-validation procedure without volume interpolation
26
27       --overwrite
28           Allow output files to overwrite existing files
29
30       --verbose
31           Verbose module output
32
33       --quiet
34           Quiet module output
35
36   Parameters:
37       input=string
38           Name of the vector map with input x,y,z,w
39
40       cellinp=string
41           Name of the surface raster map for cross-section
42
43       wcolumn=string
44           Name of the column containing w attribute to interpolate
45           Default: flt1
46
47       tension=float
48           Tension parameter
49           Default: 40.
50
51       smooth=float
52           Smoothing parameter
53           Default: 0.1
54
55       scolumn=string
56           Name of the column with smoothing parameters
57
58       where=sql_query
59           WHERE conditions of SQL statement without 'where' keyword
60           Example: income = 10000
61
62       devi=string
63           Output deviations vector point file
64
65       cvdev=string
66           Output cross-validation vector map
67
68       maskmap=string
69           Name of the raster map used as mask
70
71       segmax=integer
72           Maximum number of points in a segment
73           Default: 50
74
75       npmin=integer
76           Minimum number of points for approximation in a segment (>segmax)
77           Default: 200
78
79       dmin=float
80           Minimum distance between points (to remove almost identical points)
81           Default: 0.500000
82
83       wmult=float
84           Conversion factor for w-values used for interpolation
85           Default: 1.0
86
87       zmult=float
88           Conversion factor for z-values
89           Default: 1.0
90
91       cellout=string
92           Output cross-section raster map
93
94       elev=string
95           Output elevation g3d-file
96
97       gradient=string
98           Output gradient magnitude g3d-file
99
100       aspect1=string
101           Output gradient horizontal angle g3d-file
102
103       aspect2=string
104           Output gradient vertical angle g3d-file
105
106       ncurv=string
107           Output change of gradient g3d-file
108
109       gcurv=string
110           Output gaussian curvature g3d-file
111
112       mcurv=string
113           Output mean curvature g3d-file
114

DESCRIPTION

116       v.vol.rst interpolates  values  to  a  3-dimensional  raster  map  from
117       3-dimensional point data (e.g. temperature, rainfall data from climatic
118       stations, concentrations from drill holes etc.) given in a  3-D  vector
119       point  file  named input.  The size of the output 3d raster map elev is
120       given by the current 3D region. Sometimes, the user may want to  get  a
121       2-D map showing a modelled phenomenon at a crossection surface. In that
122       case, cellinp and cellout options must be specified and then the output
123       2D  raster  map cellout contains crossection of the interpolated volume
124       with a surface defined by cellinp 2D raster map. As an option, simulta‐
125       neously  with  interpolation,  geometric parameters of the interpolated
126       phenomenon can be computed (magnitude of gradient, direction of  gradi‐
127       ent  defined  by  horizontal  and vertical angles), change of gradient,
128       Gauss-Kronecker curvature, or mean curvature). These geometric  parame‐
129       teres  are  saved  as 3d raster maps gradient, aspect1, aspect2, ncurv,
130       gcurv, mcurv, respectively.
131
132       At first, data points are checked for identical points and points  that
133       are closer to each other than given dmin are removed.  Parameters wmult
134       and zmult allow user to re-scale the w-values and z-coordinates of  the
135       point  data (useful e.g. for transformation of elevations given in feet
136       to meters, so that the proper values of gradient and curvatures can  be
137       computed).   Rescaling  of  z-coordinates  is also needed when the dis‐
138       tances in vertical direction are much smaller than the horizontal  dis‐
139       tances,  if  that is the case, the value of zmult should be selected so
140       that the vertical and horizontal distances have about the  same  magni‐
141       tude.
142
143       Regularized  spline  with  tension method is used in the interpolation.
144       The tension parameter controls the distance over which each given point
145       influences  the  resulting  volume  (with very high tension, each point
146       influences only its close neighborhood and the volume goes  rapidly  to
147       trend  between  the points).  Higher values of tension parameter reduce
148       the overshoots that can appear in volumes with rapid change  of  gradi‐
149       ent. For noisy data, it is possible to define a global smoothing param‐
150       eter, smooth.  With the smoothing parameter set to zero (smooth=0)  the
151       resulting  volume passes exactly through the data points.  When smooth‐
152       ing is used, it is possible to output  a  vector  map  devi  containing
153       deviations of the resulting volume from the given data.
154
155       User  can define a 2D raster map named maskmap, which will be used as a
156       mask. The  interpolation  is  skipped  for  3-dimensional  cells  whose
157       2-dimensional  projection  has  zero value in mask. Zero values will be
158       assigned to these cells in all output 3d raster maps.
159
160       If the number of given points is greater than 700, segmented processing
161       is  used.  The  region is split into 3-dimensional "box" segments, each
162       having less than segmax points and interpolation is performed  on  each
163       segment  of the region. To ensure the smooth connection of segments the
164       interpolation function for each segment is computed using the points in
165       given segment and the points in its neighborhood. The minimum number of
166       points taken for interpolation is controlled by npmin ,  the  value  of
167       which  must  be larger than segmax and less than 700. This limit of 700
168       was selected to ensure the numerical stability and  efficiency  of  the
169       algorithm.
170
171   EXAMPLE
172       Spearfish example (we simulate 3D soil range data):
173       g.region -dp
174       # define volume
175       g.region res=50 tbres=50 b=0 t=1500 -ap3
176       # random elevation extraction (2D)
177       r.random elevation.10m vector_output=elevrand n=200
178       # conversion to 3D
179       v.db.addcol elevrand col="x double precision, y double precision"
180       v.to.db elevrand option=coor col=x,y
181       v.db.select elevrand
182       # create new 3D map
183       v.in.db elevrand out=elevrand_3d x=x y=y z=value key=cat
184       v.info -c elevrand_3d
185       v.info -t elevrand_3d
186       # remove the now superfluous 'x', 'y' and 'value' (z) columns
187       v.db.dropcol elevrand_3d col=x
188       v.db.dropcol elevrand_3d col=y
189       v.db.dropcol elevrand_3d col=value
190       # add attribute to interpolate
191       # (Soil range types taken from the USDA Soil Survey)
192       d.rast soils.range
193       d.vect elevrand_3d
194       v.db.addcol elevrand_3d col="soilrange integer"
195       v.what.rast elevrand_3d col=soilrange rast=soils.range
196       # fix 0 (no data in raster map) to NULL:
197       v.db.update elevrand_3d col=soilrange value=NULL where="soilrange=0"
198       v.db.select elevrand_3d
199       # interpolate volume
200       v.vol.rst elevrand_3d wcol=soilrange elev=soilrange zmult=100
201       # visualize
202       nviz elevation.10m vol=soilrange
203       # export to Paraview
204       r.out.vtk elevation.10m out=elev.vtk
205       r3.out.vtk elevrand_3d out=volume.vtk
206       paraview
207
208
209   SQL support
210       Using the where parameter, the interpolation can be limited to use only
211       a subset of the input vectors.
212       # preparation as in above example
213       v.vol.rst   elevrand_3d   wcol=soilrange    elev=soilrange    zmult=100
214       where="soilrange > 3"
215
216
217   Cross validation procedure
218       Sometimes it can be difficult to figure out the proper values of inter‐
219       polation parameters. In this case, the user can use  a  crossvalidation
220       procedure  using  -c  flag (a.k.a. "jack-knife" method) to find optimal
221       parameters for given data. In this method, every  point  in  the  input
222       point  file is temporarily excluded from the computation and interpola‐
223       tion error for this point location is computed.  During this  procedure
224       no output grid files can be simultanuously computed.  The procedure for
225       larger datasets may take a very long time, so it might be worth to  use
226       just a sample data representing the whole dataset.
227
228       Example (<based on Slovakia3d dataset):
229
230
231       v.info -c precip3d
232       v.vol.rst   -c   input=precip3d   wcolumn=precip   zmult=50  segmax=700
233       cvdev=cvdevmap tension=10
234       v.db.select cvdevmap
235       v.univar cvdevmap col=flt1 type=point
236        From the results, parameters have to be optimized. It  is  recommended
237       to plot the CV error as curve while modifying the parameters.
238
239       The best approach is to start with tension, smooth and zmult with rough
240       steps, or to set zmult to a  constant  somewhere  between  30-60.  This
241       helps to find minimal RMSE values while then finer steps can be used in
242       all   parameters.   The   reasonable   range    is    tension=10...100,
243       smooth=0.1...1.0, zmult=10...100.
244
245       In  v.vol.rst  the  tension parameter is much more sensitive to changes
246       than in v.surf.rst, therefore the user should always check  the  result
247       by  visual  inspection.  Minimizing CV does not always provide the best
248       result, especially when the density of data are insufficient. Then  the
249       optimal result found by CV is an oversmoothed surface.
250
251   Further notes
252       v.vol.rst  uses  regularized spline with tension for interpolation from
253       point data (as described in Mitasova and Mitas, 1993). The  implementa‐
254       tion  has  an  improved segmentation procedure based on Oct-trees which
255       enhances the efficiency for large data sets.
256
257       Geometric parameters - magnitude  of  gradient  (gradient),  horizontal
258       (aspect1)  and  vertical (aspect2) aspects, change of gradient (ncurv),
259       Gauss-Kronecker  (gcurv)  and  mean  curvatures  (mcurv)  are  computed
260       directly  from  the  interpolation function so that the important rela‐
261       tionships between these parameters are preserved. More  information  on
262       these parameters can be found in Mitasova et al., 1995 or Thorpe, 1979.
263
264       The program gives warning when significant overshoots appear and higher
265       tension should be used. However, with tension too  high  the  resulting
266       volume  will have local maximum in each given point and everywhere else
267       the volume goes rapidly to trend. With smoothing parameter greater than
268       zero  the  volume  will not pass through the data points and the higher
269       the parameter the closer the volume will be to the trend. For theory on
270       smoothing with splines see Talmi and Gilat, 1977 or Wahba, 1990.
271
272       If  a  visible  connection  of  segments appears, the program should be
273       rerun with higher npmin to get more points  from  the  neighborhood  of
274       given segment.
275
276       If the number of points in a vector map is less then 400, segmax should
277       be set to 400 so that segmentation is not performed when it is not nec‐
278       essary.
279
280       The  program  gives  warning when user wants to interpolate outside the
281       "box" given by minimum and maximum coordinates in vector map, zoom into
282       the area where the points are is suggested in this case.
283
284       For  large data sets (thousands of data points) it is suggested to zoom
285       into a smaller representative area and test whether the parameters cho‐
286       sen (e.g. defaults) are appropriate.
287
288       The  user must run g.region before the program to set the 3D region for
289       interpolation.
290

NOTES

292       The vector points map must be a 3D vector map (x, y,  z  as  geometry).
293       The module v.in.db can be used to generate a 3D vector map from a table
294       containing x,y,z columns.
295

BUGS

297       devi  file  is  written  as  2D  and  deviations  are  not  written  as
298       attributes.
299

SEE ALSO

301       g.region, v.in.ascii, r3.mask, v.in.db, v.surf.rst, v.univar
302

AUTHOR

304       Original version of program (in FORTRAN) and GRASS enhancements:
305       Lubos  Mitas,  NCSA,  University of Illinois at Urbana-Champaign, Illi‐
306       nois, USA, since 2000 at Department of Physics,  North  Carolina  State
307       University, Raleigh, USA lubos_mitas@ncsu.edu
308       Helena  Mitasova, Department of Marine, Earth and Atmospheric Sciences,
309       North Carolina State University,  Raleigh,  USA,  <a  href="mailto:hmi‐
310       taso@unity.ncsu.edu">hmitaso@unity.ncsu.edu
311
312       Modified  program (translated to C, adapted for GRASS, new segmentation
313       procedure):
314       Irina Kosinovsky, US Army CERL, Champaign, Illinois, USA
315       Dave Gerdes, US Army CERL, Champaign, Illinois, USA
316
317       Modifications for g3d library, geometric parameters,  cross-validation,
318       deviations:
319       Jaro  Hofierka,  Department of Geography and Regional Development, Uni‐
320       versity       of       Presov,       Presov,        Slovakia,        <a
321       href="MAILTO:hofierka@fhpv.unipo.sk">hofierka@fhpv.unipo.sk,         <a
322       href="http://www.geomodel.sk">http://www.geomodel.sk
323

REFERENCES

325       Hofierka J., Parajka J., Mitasova  H.,  Mitas  L.,  2002,  Multivariate
326       Interpolation  of  Precipitation Using Regularized Spline with Tension.
327       Transactions in GIS  6, pp. 135-150.
328
329       Mitas, L., Mitasova, H., 1999, Spatial  Interpolation.  In:  P.Longley,
330       M.F.   Goodchild, D.J. Maguire, D.W.Rhind (Eds.), Geographical Informa‐
331       tion Systems:  Principles,  Techniques,  Management  and  Applications,
332       Wiley, pp.481-492
333
334       Mitas     L.,     Brown     W.    M.,    Mitasova    H.,    1997,    <a
335       href="http://skagit.meas.ncsu.edu/%7Ehelena/gmslab/lcgfin/cg-
336       mitas.html">Role  of  dynamic  cartography  in simulations of landscape
337       processes based on multi-variate  fields.  Computers  and  Geosciences,
338       Vol.  23,  No.  4,  pp.  437-446  (includes  CDROM  and  WWW: www.else‐
339       vier.nl/locate/cgvis)
340
341       Mitasova H., Mitas L.,   Brown  W.M.,   D.P.  Gerdes,  I.   Kosinovsky,
342       Baker, T.1995, Modeling spatially and temporally distributed phenomena:
343       New methods and tools for GRASS GIS. International Journal  of  GIS,  9
344       (4),  special  issue  on  Integrating  GIS  and Environmental modeling,
345       433-446.
346
347        Mitasova, H., Mitas, L., Brown, B., Kosinovsky, I., Baker, T., Gerdes,
348       D.       (1994):       <a      href="http://skagit.meas.ncsu.edu/%7Ehe
349       lena/gmslab/viz/ches.html">Multidimensional interpolation  and  visual‐
350       ization in GRASS GIS
351
352       <a                             href="http://skagit.meas.ncsu.edu/%7Ehe
353       lena/gmslab/papers/lmg.rev1.ps">Mitasova H. and Mitas L. 1993: Interpo‐
354       lation  by  Regularized  Spline with Tension: I. Theory and Implementa‐
355       tion, Mathematical Geology 25, 641-655.
356
357       <a                             href="http://skagit.meas.ncsu.edu/%7Ehe
358       lena/gmslab/papers/hmg.rev1.ps">Mitasova   H.  and  Hofierka  J.  1993:
359       Interpolation by Regularized Spline with Tension:  II.  Application  to
360       Terrain  Modeling  and  Surface Geometry Analysis, Mathematical Geology
361       25, 657-667.
362
363       Mitasova, H., 1992 : New capabilities for interpolation and topographic
364       analysis in GRASS, GRASSclippings 6, No.2 (summer), p.13.
365
366       Wahba,  G.,  1990  :  Spline  Models  for  Observational Data, CNMS-NSF
367       Regional Conference series in applied mathematics, 59, SIAM,  Philadel‐
368       phia, Pennsylvania.
369
370       Mitas,  L.,  Mitasova  H.,  1988  : General variational approach to the
371       interpolation problem, Computers and Mathematics with Applications  16,
372       p. 983
373
374       Talmi,  A.  and  Gilat,  G.,  1977 : Method for Smooth Approximation of
375       Data, Journal of Computational Physics, 23, p.93-123.
376
377       Thorpe, J. A.  (1979):  Elementary  Topics  in  Differential  Geometry.
378       Springer-Verlag, New York, pp. 6-94.
379
380       Last changed: $Date: 2008-02-19 20:39:46 +0100 (Tue, 19 Feb 2008) $
381
382       Full index
383
384       © 2003-2008 GRASS Development Team
385
386
387
388GRASS 6.3.0                                                       v.vol.rst(1)
Impressum