r.resamp.rst(1)        Grass User's Manual	  r.resamp.rst(1)



NNAAMMEE
       _r_._r_e_s_a_m_p_._r_s_t  -	reinterpolates	and  computes topographic
       analysis from input raster file to a new raster file (pos-
       sibly  with different resolution) using regularized spline
       with tension and smoothing.

       (_G_R_A_S_S _R_a_s_t_e_r _P_r_o_g_r_a_m)



SSYYNNOOPPSSIISS
       rr..rreessaammpp..rrsstt

       rr..rreessaammpp..rrsstt hheellpp

       rr..rreessaammpp..rrsstt [[--rr]] [[--dd]] [[--tt]] iinnppuutt  =  name  eeww__rreess  =  val
       nnss__rreess  =  val  eelleevv = name [ssllooppee = name] [aassppeecctt = name]
       [ppccuurrvv = name] [ttccuurrvv = name] [mmccuurrvv  =	name]  [ssmmooootthh	=
       name] [mmaasskkmmaapp = name] [oovveerrllaapp = val] [zzmmuulltt = val] [tteenn--
       ssiioonn = val]



DDEESSCCRRIIPPTTIIOONN
       _r_._r_e_s_a_m_p_._r_s_t

       This program reinterpolates the values a from given raster
       file  named  _i_n_p_u_t  to a new raster file named _e_l_e_v. If _-_r
       flag is specified, all zero elevations in _i_n_p_u_t	file  are
       treated	as  elevations, otherwise they are ignored. Rein-
       terpolation (resampling) is done to higher, same or  lower
       resolution  which  is  specified  by parameters _e_w___r_e_s and
       _n_s___r_e_s. All resulting raster files  are	created  for  the
       given  region (which might be different from the header of
       the input raster file).	As an option, simultaneously with
       interpolation,  topographic parameters slope, aspect, pro-
       file 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
       _s_l_o_p_e_, _a_s_p_e_c_t_, _p_c_u_r_v_, _t_c_u_r_v_, _m_c_u_r_v  respectively.   If  _-_d
       flag  is  set  the  program  outputs  partial  derivatives
       fx,fy,fxx, fxy,fyy instead of  slope,  aspect  and  curva-
       tures.

       For  noisy  data, it is possible to define spatially vari-
       able smoothing by prividing a raster file _s_m_o_o_t_h  contain-
       ing  smoothing  parameters.   With the smoothing parameter
       set to zero (_s_m_o_o_t_h is not given or contains  zero  data),
       the  resulting  surface	passes	exactly  through the data
       points. User can define a raster file named _m_a_s_k_m_a_p, 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. Param-
       eter _z_m_u_l_t allows the user to rescale the  z-values  (use-
       ful,  e.g., for transformation of elevations given in feet
       to meters, so that the proper values of slopes and  curva-
       tures can be computed).

       Regularized spline with tension is used for the interpola-
       tion. The _t_e_n_s_i_o_n parameter tunes  the  character  of  the
       resulting  surface  from  thin  plate  to membrane. Higher
       values of tension parameter reduce the overshoots that can
       appear in surfaces with rapid change of gradient. The flag
       _-_t can be set to  use  "dnorm  independent  tension".  The
       interpolation is performed for overlaping rectangular seg-
       ments. The user can define the width of overlap (in number
       of cells) by option _o_v_e_r_l_a_p.



OOPPTTIIOONNSS
       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:

       rr..rreessaammpp..rrsstt [[--rr]] [[--dd]] [[--tt]] iinnppuutt  =  name  eeww__rreess  =  val
       nnss__rreess  =  val  eelleevv = name [ssllooppee = name] [aassppeecctt = name]
       [ppccuurrvv = name] [ttccuurrvv = name] [mmccuurrvv  =	name]  [ssmmooootthh	=
       name]  [mmaasskkmmaapp	=  name]  [oovveerrllaapp = val] [ zzmmuulltt = val ]
       [tteennssiioonn = val]

       Alternatively, the user can simply type	 rr..rreessaammpp..rrsstt  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 _p_a_r_s_e_r .

       FFllaaggss

	--rr Indicates that zeroes in input  map	represent  eleva-
       tion.

       --dd Output partial derivatives instead of aspect, slope and
       curvatures

       PPaarraammeetteerrss:

	iinnppuutt =_n_a_m_e

       Use the existing site file _n_a_m_e as input.

	eeww__rreess = _v_a_l

       Set desired east-west resolution to _v_a_l .

	nnss__rreess = _v_a_l

       Set desired north-south resolution to _v_a_l .

       eelleevv = _n_a_m_e

       Output elevation values to raster file named _n_a_m_e .

       ssllooppee = _n_a_m_e

       Output slope or fx values to raster file named _n_a_m_e .

       aassppeecctt = _n_a_m_e

       Output aspect or fy values to raster file named _n_a_m_e .

       ppccuurrvv = _n_a_m_e

       Output profile curvature or  fxx  values  to  raster  file
       named _n_a_m_e

       ttccuurrvv=_n_a_m_e

       Output  tangential  curvature values or fyy to raster file
       named _n_a_m_e

       mmccuurrvv=_n_a_m_e

       Output mean curvature values or fxy to raster  file  named
       _n_a_m_e


       ssmmooootthh=_n_a_m_e

       18 Set smoothing parameter from file _n_a_m_e .

       mmaasskkmmaapp=_n_a_m_e

       Use the existing raster file _n_a_m_e as a mask.

       oovveerrllaapp =_v_a_l

       Use  overlap _v_a_l cells to get additional points for inter-
       polation for a given segment. Default value is 3.

	zzmmuulltt =_v_a_l

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

	tteennssiioonn = _v_a_l

       Set tension to _v_a_l .



NNOOTTEESS
       _r_._r_e_s_a_m_p_._r_s_t  uses  regularized	spline	with  tension for
       interpolation (as described in Mitasova and Mitas,  1993).
       Region  is  temporarily changed while writing output files
       with desired resolution. Topographic parameters	are  com-
       puted  the  same  way as in s.surf.rst. (See also Mitasova
       and Hofierka, 1993)  Raster  file  _s_m_o_o_t_h  should  contain
       variable  smoothing  parameters	that  can be derived from
       errors, slope, etc. using  _r_._m_a_p_c_a_l_c.  The  program  gives
       warning when significant overshoots appear and higher ten-
       sion 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. When overshoots occure the result-
       ing _e_l_e_v file will have white color in  the  locations  of
       overshoots  since  the  color table for the output file is
       the same as colortable for raster input	file.The  program
       checks  the numerical stability of the algorithm by compu-
       tation of values in given points, and prints  the  maximum
       difference  found into the history file of raster map _e_l_e_v
       . 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 program writes the values of parameters used in compu-
       tation into the comment part of the history file  _e_l_e_v  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 ten-
       sion. The program gives warning when  the  user	wants  to
       interpolate  outside the region given by the header of the
       input raster file, zooming 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  interpo-
       lation,	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 _r_._r_e_s_a_m_p_._r_s_t	.



SSEEEE AALLSSOO
       r.resample, s.surf.rst



AAUUTTHHOORRSS
       _O_r_i_g_i_n_a_l _v_e_r_s_i_o_n _o_f _p_r_o_g_r_a_m _(_i_n _F_O_R_T_R_A_N_)_:

       Lubos  Mitas, NCSA, University of Illinois at Urbana Cham-
       paign, Il

       Helena Mitasova, US Army CERL, Champaign, Illinois

       _M_o_d_i_f_i_e_d _p_r_o_g_r_a_m _(_t_r_a_n_s_l_a_t_e_d _t_o _C_,  _a_d_a_p_t_e_d  _f_o_r  _G_R_A_S_S	_,
       _s_e_g_m_e_n_t_a_t_i_o_n _p_r_o_c_e_d_u_r_e_)_:

       Irina Kosinovsky, US Army CERL .

       Dave Gerdes, US Army CERL .



RREEFFEERREENNCCEESS
       Mitas,  L., Mitasova, H., 1999, Spatial Interpolation. In:
       P.Longley,  M.F.   Goodchild,  D.J.   Maguire,	D.W.Rhind
       (Eds.),	 Geographical  Information  Systems:  Principles,
       Techniques, Management and Applications, Wiley, 481-492.

       Mitasova, H. and Mitas, L., 1993. Interpolation	by  regu-
       larized spline with tension: I. Theory and implementation,
       Mathematical Geology No.25 p.641-656.

       Mitasova, H. and Hofierka, L., 1993. Interpolation by reg-
       ularized  spline  with tension: II. Application to terrain
       modeling and surface geometry analysis, Mathematical Geol-
       ogy No.25 p.657-667.

	Talmi, A. and Gilat, G., 1977. Method for smooth approxi-
       mation of data, Journal of Computational Physics , 23,  pp
       93-123.

       Wahba,  G.,  1990.  Spline  models for observational data,
       CNMS-NSF Regional Conference series in  applied	mathemat-
       ics, 59, SIAM, Philadelphia, Pennsylvania.

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_4 _$



GRASS 5.0					  r.resamp.rst(1)
