other gridding rules
[surfit gridding rules]


Functions

bool surfit::completer (REAL D1=1, REAL D2=2, REAL alpha=0, REAL w=1)
bool surfit::completer_add (REAL weight=1, REAL D1=1, REAL D2=2, REAL alpha=0, REAL w=1)
bool surfit::value (REAL val=0)
bool surfit::value_add (REAL weight=1, REAL val=0)
bool surfit::mean (REAL value, REAL mult=0.001)
bool surfit::wmean (REAL value, const char *surface_name_or_position="0", REAL mult=0.001)
bool surfit::leq (REAL value, REAL mult=0.001)
bool surfit::geq (REAL value, REAL mult=0.001)

Function Documentation

bool completer REAL  D1 = 1,
REAL  D2 = 2,
REAL  alpha = 0,
REAL  w = 1
 

Tcl syntax:
completer D1 D2
Description:
This rule describes the resulting surface behavior in the areas of low data density. This rule applies to whole resulting surface. Here is simple example of "completer" D1 and D2 variables influence:
surface_and_points.jpg

completer 0 1

surface_and_points2.jpg

completer 1 5

surface_and_points3.jpg

completer 1 0

Parameters:
D1 weight coefficient for rule that the resulting surface should tend to constant surface
D2 weight coefficient for rule that the resulting surface should tend to plane surface
alpha anisotropy angle (degrees)
w anisotropy factor
Math:
This command adds the following functional to the functional sequence:

\[ \Phi(u_{1,1},\ldots,u_{N,M}) = D_1 \Phi_1(u_{1,1},\ldots,u_{N,M}) + D_2 \Phi_2(u_{1,1},\ldots,u_{N,M}), \]

where

\[ \Phi_1(u_{1,1},\ldots,u_{N,M}) = \left[ \sum\limits_{j=0}^{M-1} \sum\limits_{i=0}^{N-2} \left( \frac{ u_{i+1,j} - u_{i,j} } { h_x } \right)^2 + \sum\limits_{i=0}^{N-1} \sum\limits_{j=0}^{M-2} \left( \frac{ u_{i,j+1} - u_{i,j} } { h_y } \right)^2 \right] \]

\[ \Phi_2 = \left[ \sum\limits_{j=0}^{M-1} \sum\limits_{i=0}^{N-3} \left( \frac{ u_{i+2,j} - 2u_{i+1,j} + u_{i,j} } {h_x^2} \right)^2 + \right. \]

\[ 2\sum\limits_{j=0}^{M-2} \sum\limits_{i=0}^{N-2} \left( \frac{ (u_{i+1,j+1} - u_{i,j+1}) - (u_{i+1,j} - u_{i,j}) } { h_x h_y } \right)^2 + \]

\[ \left. \sum\limits_{i=0}^{N-1} \sum\limits_{j=0}^{M-3} \left( \frac{ u_{i,j+2} - 2u_{i,j+1} + u_{i,j} } { h_y^2 } \right)^2 \right]. \]

Examples:
area.tcl, area_completer.tcl, area_ineq.tcl, area_mean.tcl, area_surf.tcl, area_surf_ineq.tcl, area_wmean.tcl, canyon_map.tcl, contour.tcl, contour_ineq.tcl, curve.tcl, curve_ineq.tcl, curve_surf.tcl, curve_surf_ineq.tcl, dem.tcl, dem_add.tcl, fault.tcl, fault_aniso.tcl, fault_approx.tcl, ineq.tcl, mask.tcl, mask_add.tcl, mask_completer.tcl, mask_ineq.tcl, mask_mean.tcl, mask_surf.tcl, mask_surf_add.tcl, mask_surf_ineq.tcl, mask_wmean.tcl, mean.tcl, points_approx.tcl, points_exact.tcl, points_ineq.tcl, surface.tcl, surface_add.tcl, surface_ineq.tcl, and wmean.tcl.

bool completer_add REAL  weight = 1,
REAL  D1 = 1,
REAL  D2 = 2,
REAL  alpha = 0,
REAL  w = 1
 

Tcl syntax:
completer_add weight D1 D2
Description:
This function modifies previous (modifiable) rule by adding the completer rule with some weight. This rule applies to whole resulting surface.
Parameters:
weight informational weight for this rule
D1 weight coefficient for rule that the resulting surface should tend to constant surface
D2 weight coefficient for rule that the resulting surface should tend to plane surface

bool geq REAL  value,
REAL  mult = 0.001
 

Tcl syntax:
geq value mult
Description:
This rule adds the surface condition - "the resulting surface should be greater than or equal to value". In case of the penalty algorithm algorithm bad convergence or unexpected (wrong) result, you should carefully review your conditions and if they are correct, try to change "mult" parameter.
Parameters:
value resulting surface values should be lower than or equal to this real number
mult multiplier parameter for penalty algorithm algorithm
Math:
This command adds the condition:

\[ u_{i,j} \geq z, \]

where (i,j) - indices of the cells, z - constant value

Examples:
ineq.tcl.

bool leq REAL  value,
REAL  mult = 0.001
 

Tcl syntax:
leq value mult
Description:
This rule adds the surface condition - "the resulting surface should be lower than or equal to value". In case of the penalty algorithm algorithm bad convergence or unexpected (wrong) result, you should carefully review your conditions and if they are correct, try to change "mult" parameter.
Parameters:
value resulting surface values should be lower than or equal to this real number
mult multiplier parameter for penalty algorithm algorithm
Math:
This command adds the condition:

\[ u_{i,j} \leq z, \]

where (i,j) - indices of the cells, z - constant value

Examples:
ineq.tcl.

bool mean REAL  value,
REAL  mult = 0.001
 

Tcl syntax:
mean value mult
Description:
This rule adds the surface condition - "the resulting surface mean value should be equal to real number". In case of the penalty algorithm algorithm bad convergence or unexpected (wrong) result, you should carefully review your conditions and if they are correct, try to change "mult" parameter.
Math:
This command adds the condition:

\[ \frac {\sum\limits_{i,j} u_{i,j}} {Q} = m \]

where (i,j) - indices of the cells, Q - total number of cells, m - desired mean value

Examples:
area_mean.tcl, and mean.tcl.

bool value REAL  val = 0  ) 
 

Tcl syntax:
value val
Descrpition:
Using this rule the resulting surface approximates constant value. This rule applies to whole resulting surface.
Parameters:
val real number for surface approximation
Math:
This command adds the following functional to the functional sequence:

\[ \Phi(u_{1,1},\ldots,u_{N,M}) = \sum_{i,j} \left( u_{i,j} - z \right)^2, \]

bool value_add REAL  weight = 1,
REAL  val = 0
 

Tcl syntax:
value_add weight val
Description:
This function modifies previous (modifiable) rule by adding the value rule with some weight. This rule applies to whole resulting surface.
Parameters:
weight informational weight for this rule
val real number for surface approximation
Math:
This command modifies previous functional $ \Phi_0 $ by adding $ \Phi_1 $:

\[ \Phi(u_{1,1},\ldots,u_{N,M}) = \Phi_0(u_{1,1},\ldots,u_{N,M}) + w\Phi_1(u_{1,1},\ldots,u_{N,M}), \]

where $ w $ - informational weight,

\[ \Phi_1(u_{1,1},\ldots,u_{N,M}) = \sum_{i,j} \left( u_{i,j} - z \right)^2, \]

bool wmean REAL  value,
const char *  surface_name_or_position = "0",
REAL  mult = 0.001
 

Tcl syntax:
wmean value "surface_name_or_position" mult
Description:
This rule adds the surface condition - "the resulting surface weighted mean value should be equal to real number". In case of the penalty algorithm algorithm bad convergence or unexpected (wrong) result, you should carefully review your conditions and if they are correct, try to change "mult" parameter.
Math:
This command adds the condition:

\[ \frac {\sum\limits_{i,j} z(x_i,y_j) u_{i,j}} {z(x_i,y_j)} = m \]

where (i,j) - indices of the cells, $z(x_i,y_j)$ - weighted surface value for the (i,j) cell, m - desired weighted mean value

Examples:
wmean.tcl.



surfit: open source gridding and contouring software.