gridding rules for areas
[surfit gridding rules]


Functions

bool surfit::area (const char *value="undef", const char *area_name_or_position="0", int inside=1)
bool surfit::area_add (REAL value, REAL weight, const char *area_name_or_position="0", int inside=1)
bool surfit::area_leq (REAL value, const char *area_name_or_position="0", REAL mult=0.001, int inside=1)
bool surfit::area_geq (REAL value, const char *area_name_or_position="0", REAL mult=0.001, int inside=1)
bool surfit::area_surf (const char *surf_name_or_position="0", const char *area_name_or_position="0", int inside=1)
bool surfit::area_surf_add (const char *surf_name_or_position="0", REAL weight=1, const char *area_name_or_position="0", int inside=1)
bool surfit::area_surf_leq (const char *surf_name_or_position="0", const char *area_name_or_position="0", REAL mult=0.001, int inside=1)
bool surfit::area_surf_geq (const char *surf_name_or_position="0", const char *area_name_or_position="0", REAL mult=0.001, int inside=1)
bool surfit::area_mean (REAL mean, const char *area_name_or_position="0", REAL mult=0.001, int inside=1)
bool surfit::area_wmean (REAL mean, const char *area_name_or_position="0", const char *surf_name_or_position="0", REAL mult=0.001, int inside=1)
bool surfit::area_completer (const char *area_name_or_position="0", REAL D1=1, REAL D2=2, REAL alpha=0, REAL w=1, int inside=1)
bool surfit::area_completer_add (REAL weight=1, const char *area_name_or_position="0", REAL D1=1, REAL D2=2, REAL alpha=0, REAL w=1, int inside=1)

Function Documentation

bool bool area const char *  value = "undef",
const char *  area_name_or_position = "0",
int  inside = 1
 

Tcl syntax:
area value "area_name_or_position" inside
Description:
Using this rule the resulting surface approximates area with constant "value" in least squares meaning. Value can be set to any real number or "undef".
Parameters:
value real number for surface approximation in area
area_name_or_position name of area dataset, or area position number.
inside if inside is equal to 1, then surface will be approximated inside area, else outside
Math:
This command adds the following functional to the functional sequence:

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

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

Examples:
area.tcl, area_ineq.tcl, area_mean.tcl, area_wmean.tcl, map_hor_frac.tcl, and map_ver_frac.tcl.

bool area_add REAL  value,
REAL  weight,
const char *  area_name_or_position = "0",
int  inside = 1
 

Tcl syntax:
area_add value weight "area_name_or_position" inside
Description:
This function modifies previous (modifiable) rule by adding the area rule with some weight. Use this rule if you don't know "value" exactly. Using this rule the resulting surface approximates area with "value" taking into account a previous (modifiable) rule.
Parameters:
value real number for surface approximation in area
weight informational weight for this rule
area_name_or_position name of area dataset, or area position number.
inside if inside is equal to 1, then surface will be approximated inside area, else outside
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_{p=1}^P \left( u_{i,j} - z \right)^2, \]

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

Examples:
area.tcl, area_ineq.tcl, area_mean.tcl, and area_wmean.tcl.

bool area_completer const char *  area_name_or_position = "0",
REAL  D1 = 1,
REAL  D2 = 2,
REAL  alpha = 0,
REAL  w = 1,
int  inside = 1
 

Tcl syntax:
area_completer "area_name_or_position" D1 D2 alpha w inside
Description
This rule implements completer rule inside or outside area
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
Examples:
area_completer.tcl.

bool area_completer_add REAL  weight = 1,
const char *  area_name_or_position = "0",
REAL  D1 = 1,
REAL  D2 = 2,
REAL  alpha = 0,
REAL  w = 1,
int  inside = 1
 

Tcl syntax:
area_completer_add weight "area_name_or_position" D1 D2 alpha w inside
Description
This rule adds rule area_completer with informational "weight" to the previous rule.
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

bool area_geq REAL  value,
const char *  area_name_or_position = "0",
REAL  mult = 0.001,
int  inside = 1
 

Tcl syntax:
area_geq value "area_name_or_position" mult inside
Description:
This rule adds the surface condition - "the resulting surface in area 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 greater than or equal to this real number
area_name_or_position name of area dataset, or area position number.
mult multiplier parameter for penalty algorithm algorithm
inside if inside is equal to 1, then surface values should be greater than or equal to value inside area, else outside
Math:
This command adds the condition:

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

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

bool area_leq REAL  value,
const char *  area_name_or_position = "0",
REAL  mult = 0.001,
int  inside = 1
 

Tcl syntax:
area_leq value "area_name_or_position" mult inside
Description:
This rule adds the surface condition - "the resulting surface in area 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
area_name_or_position name of area dataset, or area position number.
mult multiplier parameter for penalty algorithm algorithm
inside if inside is equal to 1, then surface values should be lower than or equal to value inside area, else outside
Math:
This command adds the condition:

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

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

Examples:
area_ineq.tcl.

bool area_mean REAL  mean,
const char *  area_name_or_position = "0",
REAL  mult = 0.001,
int  inside = 1
 

Tcl syntax:
area_mean mean_value "area_name_or_position" mult inside
Description:
This rule adds the surface condition - "the resulting surface mean value in area 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 in area, Q - number of cells in area, m - desired mean value

Examples:
area_mean.tcl.

bool area_surf const char *  surf_name_or_position = "0",
const char *  area_name_or_position = "0",
int  inside = 1
 

Tcl syntax:
area_surf "surf_name_or_position" mult inside
Description:
Using this rule the resulting surface approximates area in least squares meaning with values taken from the other surface.
Parameters:
surf_name_or_position name of surface, or surface position number. Resulting surface will approximate this surface values inside (or outside) area.
area_name_or_position name of area dataset, or area position number.
inside if inside is equal to 1, then surface will be approximated inside area, else outside
Math:
This command adds the following functional to the functional sequence:

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

where (i,j) - indices of the cells in area, $z(x_i, y_j)$ - surface value for the (i,j) cell.

Examples:
area_surf.tcl.

bool area_surf_add const char *  surf_name_or_position = "0",
REAL  weight = 1,
const char *  area_name_or_position = "0",
int  inside = 1
 

Tcl syntax:
area_surf_add "surf_name_or_position" weight "area_name_or_position" inside
Description:
This function modifies previous (modifiable) rule by adding the area_surf rule with some weight. Using this rule the resulting surface approximates area with other surface "values" taking into account a previous (modifiable) rule.
Parameters:
surf_name_or_position name of surface, or surface position number. Resulting surface will approximate this surface values inside (or outside) area.
weight informational weight for this rule
area_name_or_position name of area dataset, or area position number.
inside if inside is equal to 1, then surface will be approximated inside area, else outside
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_{p=1}^P \left( u_{i,j} - z(x_i, y_j) \right)^2, \]

where (i,j) - indices of the cells in area, $z(x_i, y_j)$ - surface value for the (i,j) cell.

Examples:
area_surf.tcl.

bool area_surf_geq const char *  surf_name_or_position = "0",
const char *  area_name_or_position = "0",
REAL  mult = 0.001,
int  inside = 1
 

Tcl syntax:
area_surf_geq "surf_name_or_position_or_position" "area_name_or_position" mult inside
Description:
This rule adds the surface condition - "the resulting surface in area should be greater than or equal to other surface". 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:

\[ u_{i,j} \geq f(x_{u_i},y_{u_j}) \]

where (i,j) - indices of the cells in area, $f(x_{u_i},y_{u_j})$ - surface value in the center of the cell.

Examples:
area_surf_ineq.tcl.

bool area_surf_leq const char *  surf_name_or_position = "0",
const char *  area_name_or_position = "0",
REAL  mult = 0.001,
int  inside = 1
 

Tcl syntax:
area_surf_leq "surf_name_or_position_or_position" "area_name_or_position" mult inside
Description:
This rule adds the surface condition - "the resulting surface in area should be lower than or equal to other surface". 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:

\[ u_{i,j} \leq f(x_{u_i},y_{u_j}) \]

where (i,j) - indices of the cells in area, $f(x_{u_i},y_{u_j})$ - surface value in the center of the cell.

Examples:
area_surf_ineq.tcl.

bool area_wmean REAL  mean,
const char *  area_name_or_position = "0",
const char *  surf_name_or_position = "0",
REAL  mult = 0.001,
int  inside = 1
 

Tcl syntax:
area_wmean weighted_mean_value "area_name_or_position" "surf_name_or_position_or_position" mult inside
Description:
This rule adds the surface condition - "the resulting surface weighted mean value in area 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 in area, $z(x_i,y_j)$ - weighted surface value for the (i,j) cell, m - desired weighted mean value

Examples:
area_wmean.tcl.



surfit: open source gridding and contouring software.