Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
image_expression_type [2020/06/27 16:34]
admin [Table Operators]
image_expression_type [2022/02/17 18:27] (current)
chrystian
Line 45: Line 45:
 | Normal | Generate a random value using the Normal probability distribution. The value is generated according to the first and second given EXPR representing,​ respectively,​ the mean and the deviation of the distribution | rNormal(EXPR,​@@@EXPR) | if@@@rNormal(10,​@@@2)@@@>​@@@9@@@then@@@1@@@else@@@i2 |  | Normal | Generate a random value using the Normal probability distribution. The value is generated according to the first and second given EXPR representing,​ respectively,​ the mean and the deviation of the distribution | rNormal(EXPR,​@@@EXPR) | if@@@rNormal(10,​@@@2)@@@>​@@@9@@@then@@@1@@@else@@@i2 | 
 | Poisson | Generate a random value using the Poisson probability distribution. The value is generated according to the given EXPR representing the distribution lambda | rPoisson(EXPR) | if@@@rPoisson(100)@@@>​@@@95@@@then@@@1@@@else@@@i2 |  | Poisson | Generate a random value using the Poisson probability distribution. The value is generated according to the given EXPR representing the distribution lambda | rPoisson(EXPR) | if@@@rPoisson(100)@@@>​@@@95@@@then@@@1@@@else@@@i2 | 
-Squared ​Root | | sqrt(EXPR) | sqrt(i1@@@/​@@@i4) |+Square ​Root | Returns the square root of the expression ​| sqrt(EXPR) | sqrt(i1@@@/​@@@i4) |
 | Sin | Sin (input in radians) | sin(EXPR) | sin(i1@@@/​@@@i4) | | Sin | Sin (input in radians) | sin(EXPR) | sin(i1@@@/​@@@i4) |
 | Cos | Cos (input in radians) | cos(EXPR) | cos(i1@@@+@@@i2) | | Cos | Cos (input in radians) | cos(EXPR) | cos(i1@@@+@@@i2) |
Line 53: Line 53:
 | Atan | Atan (output in radians) | atan(EXPR) | atan(i1@@@+@@@i2) | | Atan | Atan (output in radians) | atan(EXPR) | atan(i1@@@+@@@i2) |
 | Ceil | [[wp>​Floor_and_ceiling_functions|Convert the value to the smallest following integer]] | ceil(EXPR) | ceil(i1@@@+@@@i2) | | Ceil | [[wp>​Floor_and_ceiling_functions|Convert the value to the smallest following integer]] | ceil(EXPR) | ceil(i1@@@+@@@i2) |
-| Exp | | exp(EXPR) | exp(i1[i1@@@+@@@i2]) |+| Exp | Returns the natural exponential of the expression ​| exp(EXPR) | exp(i1[i1@@@+@@@i2]) |
 | Floor | [[wp>​Floor_and_ceiling_functions|Convert the value to the largest previous integer]] | floor(EXPR) | floor(i1@@@+@@@i2) | | Floor | [[wp>​Floor_and_ceiling_functions|Convert the value to the largest previous integer]] | floor(EXPR) | floor(i1@@@+@@@i2) |
 | Round | Convert the value to the nearest integer | round(EXPR) | round(i1@@@/​@@@i4) | | Round | Convert the value to the nearest integer | round(EXPR) | round(i1@@@/​@@@i4) |
-| Abs | | abs(EXPR) | abs(i1@@@+@@@i2) | +| Abs | Returns the absolute value of the expression ​| abs(EXPR) | abs(i1@@@+@@@i2) | 
-| Ln | | ln(EXPR) | ln(i1@@@/​@@@i4) | +| Ln | Returns the natural logarithm of the expression ​| ln(EXPR) | ln(i1@@@/​@@@i4) | 
-| Log | | log(EXPR) | log(i1@@@/​@@@i4) | +| Log | Returns the logarithm of the expression to the base of 10 | log(EXPR) | log(i1@@@/​@@@i4) | 
-| Max | | max(EXPR,​@@@EXPR) | max(i1,​@@@i2) | +| Max | Returns the maximum value | max(EXPR,​@@@EXPR) | max(i1,​@@@i2) | 
-| Min | | min(EXPR,​@@@EXPR) | min(i1,​@@@i4) |+| Min | Returns the minimum value | min(EXPR,​@@@EXPR) | min(i1,​@@@i4) |
 | Signal | Return +1, if the expression is positive, -1, if it is negative, and 0, otherwise. | signal(EXPR) | signal(i1@@@-@@@4) | | Signal | Return +1, if the expression is positive, -1, if it is negative, and 0, otherwise. | signal(EXPR) | signal(i1@@@-@@@4) |
 | Abort | Abort the model execution | abort | if@@@i1@@@>​@@@0@@@then@@@i1@@@*@@@i2@@@+@@@4@@@else@@@abort | | Abort | Abort the model execution | abort | if@@@i1@@@>​@@@0@@@then@@@i1@@@*@@@i2@@@+@@@4@@@else@@@abort |
Line 76: Line 76:
 ^ Operator ^ Description ^ Syntax ^ Usage Example ^ ^ Operator ^ Description ^ Syntax ^ Usage Example ^
 | Get Image Value | Return the image value at the current cell | IMAGE | i2 | | Get Image Value | Return the image value at the current cell | IMAGE | i2 |
-| Get Image Value At Location | Return the image value on the specified cell coordinate. The cell coordinate is defined by two expressions where the first expression represents the cell line and the second expression represents the cell column. | IMAGE[@@@,​@@@] | i1[line@@@–@@@1,​@@@column@@@–@@@2] |+| Get Image Value At Location | Return the image value on the specified cell coordinate. The cell coordinate is defined by two expressions where the first expression represents the cell line and the second expression represents the cell column. If the cell at that coordinate is null, the value 0 is returned. | IMAGE[@@@,​@@@] | i1[line@@@–@@@1,​@@@column@@@–@@@2] |
 | Get Image Null Value | Return the null value of the current image. It is also possible to specify an image whose corresponding null value will be retrieved. \\ The use of null without specifying an image "​poisons"​ the expression evaluation forcing the expression result to be invalid. | null \\ null(IMAGE) | if@@@i1@@@>​@@@2@@@then@@@i1@@@else@@@null \\ if@@@null(i2)@@@>​@@@2@@@then@@@1@@@else@@@null | | Get Image Null Value | Return the null value of the current image. It is also possible to specify an image whose corresponding null value will be retrieved. \\ The use of null without specifying an image "​poisons"​ the expression evaluation forcing the expression result to be invalid. | null \\ null(IMAGE) | if@@@i1@@@>​@@@2@@@then@@@i1@@@else@@@null \\ if@@@null(i2)@@@>​@@@2@@@then@@@1@@@else@@@null |
 | Is Null | Return 1, if the given expression is null, and 0, otherwise. Can also be used to test whether the result of any expression is invalid or not. | isNull(EXPR) | if@@@not@@@isNull(i1)@@@then@@@i1@@@else@@@i2 | | Is Null | Return 1, if the given expression is null, and 0, otherwise. Can also be used to test whether the result of any expression is invalid or not. | isNull(EXPR) | if@@@not@@@isNull(i1)@@@then@@@i1@@@else@@@i2 |
Line 89: Line 89:
  
 ^ Operator ^ Description ^ Syntax ^ Usage Example ^ ^ Operator ^ Description ^ Syntax ^ Usage Example ^
-| Get Table Value | Return the table value associated ​to the EXPR key in the table | TABLE[EXPR] | t2[i1@@@+@@@2] | +| Get Table Value | Return the table value associated ​with the EXPR key in the table | TABLE[EXPR] | t2[i1@@@+@@@2] | 
-| Get Table Equal Lower Bound Value | Return the table value associated ​to the greater key less than or equal to the EXPR key in the table. | TABLE[<​nowiki><​=</​nowiki>​@@@EXPR] \\ <​del>​TABLE{EXPR}</​del>​ | t2[<​nowiki><​=</​nowiki>​@@@14] \\ <​del>​t2{14}</​del>​ | +| Get Table Equal Lower Bound Value | Return the table value associated ​with the greater key less than or equal to the EXPR key in the table. | TABLE[<​nowiki><​=</​nowiki>​@@@EXPR] \\ <​del>​TABLE{EXPR}</​del>​ | t2[<​nowiki><​=</​nowiki>​@@@14] \\ <​del>​t2{14}</​del>​ | 
-| Get Table Lower Bound Value | Return the table value associated ​to the greater key less than the EXPR key in the table. | TABLE[<​@@@EXPR] | t2[<​@@@i1@@@+@@@2] | +| Get Table Lower Bound Value | Return the table value associated ​with the greater key less than the EXPR key in the table. | TABLE[<​@@@EXPR] | t2[<​@@@i1@@@+@@@2] | 
-| Get Table Equal Upper Bound Value | Return the table value associated ​to the lesser key greater than or equal to the EXPR key in the table. | TABLE[>​=@@@EXPR] | t2[>​=@@@i1@@@+@@@i3] | +| Get Table Equal Upper Bound Value | Return the table value associated ​with the lesser key greater than or equal to the EXPR key in the table. | TABLE[>​=@@@EXPR] | t2[>​=@@@i1@@@+@@@i3] | 
-| Get Table Upper Bound Value | Return the table value associated ​to lesser key greater than the EXPR key in the table. | TABLE[>​@@@EXPR] | t2[>​@@@i7] | +| Get Table Upper Bound Value | Return the table value associated ​with lesser key greater than the EXPR key in the table. | TABLE[>​@@@EXPR] | t2[>​@@@i7] | 
-| Get Table Closest Value | Return the table value associated ​to the key closest to the EXPR key in the table. | TABLE[><​@@@EXPR] | t2[><​@@@3@@@+@@@i7] |+| Get Table Closest Value | Return the table value associated ​with the key closest to the EXPR key in the table. | TABLE[><​@@@EXPR] | t2[><​@@@3@@@+@@@i7] |
 | Get Table Interpolaled Value | Return a linear interpolated value drawn through the neighbor keys of the EXPR key in the table. | TABLE[/​@@@EXPR] | t2[/@@@i2] | | Get Table Interpolaled Value | Return a linear interpolated value drawn through the neighbor keys of the EXPR key in the table. | TABLE[/​@@@EXPR] | t2[/@@@i2] |
 | Test Table Key | Return 1, if expression corresponds to a key stored in the table, and 0, otherwise. | TABLE[?​@@@EXPR] \\ TABLE[=?​@@@EXPR] \\ TABLE[==?​@@@EXPR] | t2[?@@@i2] \\ t2[=?@@@i2] |  | Test Table Key | Return 1, if expression corresponds to a key stored in the table, and 0, otherwise. | TABLE[?​@@@EXPR] \\ TABLE[=?​@@@EXPR] \\ TABLE[==?​@@@EXPR] | t2[?@@@i2] \\ t2[=?@@@i2] | 
Line 103: Line 103:
 Table operators return the value corresponding to a given set of keys.  Table operators return the value corresponding to a given set of keys. 
  
-They have the following syntax: \\ @@@@@@@@@TABLE[@@@[@@@]@@@[@@@]@@@] \\ where: \\ @@@@@@@@@TABLE is a table identifier corresponding to a **[[Table Type|table]]**. //Beware that, if the identifier ​corresponds ​to a [[Lookup Table Type|lookup table]], an error will be reported//;+They have the following syntax: \\ @@@@@@@@@TABLE[@@@[@@@]@@@[@@@]@@@] \\ where: \\ @@@@@@@@@TABLE is a table identifier corresponding to a **[[Table Type|table]]**. //Beware that, if the identifier ​is bound to a [[Lookup Table Type|lookup table]], an error will be reported//;
  
 The expressions representing the set of keys must be separated by commas. ​ The expressions representing the set of keys must be separated by commas. ​
  
 ^ Operator ^ Description ^ Syntax ^ Usage Example ^ ^ Operator ^ Description ^ Syntax ^ Usage Example ^
-| Get Table Value At Default Column | Return the table value associated ​to the set of keys in the first data column. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@] | +| Get Table Value At Default Column | Return the table value associated ​with the set of keys in the first data column. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@] | 
-| Get Table Value At Named Column | Return the table value associated ​to the set of keys in the column named by the given name. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@[@@@NAME@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@[@@@"​Area_In_Hectares"​@@@]@@@] | +| Get Table Value At Named Column | Return the table value associated ​with the set of keys in the column named by the given name. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@[@@@NAME@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@[@@@"​Area_In_Hectares"​@@@]@@@] | 
-| Get Table Value At Column Index | Return the table value associated ​ ​to ​the set of keys in the column indexed by the given expression. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@[@@@EXPR@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@[@@@v1+2@@@]@@@] |+| Get Table Value At Column Index | Return the table value associated ​with the set of keys in the column indexed by the given expression. | TABLE[@@@[EXPR,​@@@EXPR,​@@@EXPR,​@@@...@@@]@@@[@@@EXPR@@@]@@@] | t2[@@@[i1@@@+@@@2,​@@@i2/​2,​@@@t1[v2]]@@@[@@@v1+2@@@]@@@] |
 ==== Image Neighborhood Functions ==== ==== Image Neighborhood Functions ====
  
Line 159: Line 159:
 @@@@@@@@@h is the number of window lines; \\  @@@@@@@@@h is the number of window lines; \\ 
 @@@@@@@@@w is the number of window columns; \\ @@@@@@@@@w is the number of window columns; \\
-@@@@@@@@@TABLE is a LookupTable containing the values associated ​to each Index (Key = Index); \\ +@@@@@@@@@TABLE is a LookupTable containing the values associated ​with each one of the Indices ​(Key = Index); \\ 
 @@@@@@@@@IMAGE2 is an Image identifier whose cell values will be returned (Cell Coordinate = Index); \\  @@@@@@@@@IMAGE2 is an Image identifier whose cell values will be returned (Cell Coordinate = Index); \\ 
 @@@@@@@@@y is the line where the window center is anchored at the image; \\  @@@@@@@@@y is the line where the window center is anchored at the image; \\