grid_calculus_1-Grid_Calculator

Grid Calculator

  29

Contributor

contributed at 2018-11-06

Authorship

Homepage:  
View
Is authorship not correct? Feed back

Classification(s)

Geography SubjectGIScience & Remote SensingGrid Processing

Detailed Description

The Grid Calculator calculates a new grid based on existing grids and a mathematical formula. The grid variables in the formula begin with the letter 'g' followed by a position index, which corresponds to the order of the grids in the input grid list (i.e.: g1, g2, g3, ... correspond to the first, second, third, ... grid in list). Grids from other systems than the default one can be addressed likewise using the letter 'h' (h1, h2, h3, ...), which correspond to the 'Grids from different Systems' list.Example: sin(g1) * g2 + 2 * h1The following operators are available for the formula definition:

+Addition
-Subtraction
*Multiplication
/Division
abs(x)Absolute Value
mod(x, y)Returns the floating point remainder of x/y
int(x)Returns the integer part of floating point value x
sqr(x)Square
sqrt(x)Square Root
exp(x)Exponential
pow(x, y)Returns x raised to the power of y
x ^ yReturns x raised to the power of y
ln(x)Natural Logarithm
log(x)Base 10 Logarithm
pi()Returns the value of Pi
sin(x)Sine
cos(x)Cosine
tan(x)Tangent
asin(x)Arcsine
acos(x)Arccosine
atan(x)Arctangent
atan2(x, y)Arctangent of x/y
min(x, y)Returns the minimum of values x and y
max(x, y)Returns the maximum of values x and y
gt(x, y)Returns true (1), if x is greater than y, else false (0)
x > yReturns true (1), if x is greater than y, else false (0)
lt(x, y)Returns true (1), if x is less than y, else false (0)
x < yReturns true (1), if x is less than y, else false (0)
eq(x, y)Returns true (1), if x equals y, else false (0)
x = yReturns true (1), if x equals y, else false (0)
and(x, y)Returns true (1), if both x and y are true (i.e. not 0)
or(x, y)Returns true (1), if at least one of both x and y is true (i.e. not 0)
ifelse(c, x, y)Returns x, if condition c is true (i.e. not 0), else y
rand_u(x, y)Random number, uniform distribution with minimum x and maximum y
rand_g(x, y)Random number, Gaussian distribution with mean x and standard deviation y
xpos(), ypos()Get the x/y coordinates for the current cell
col(), row()Get the current cell's column/row index
ncols(), nrows()Get the number of columns/rows
nodata()Returns resulting grid's no-data value

How to cite

SAGA (2018). grid_calculus_1-Grid_Calculator, Model Item, OpenGMS, https://geomodeling.njnu.edu.cn/modelItem/5a8ed734-dc26-4679-80c1-2b2cf046039e
Copy

QR Code

Contributor

contributed at 2018-11-06

Authorship

Homepage:  
View
Is authorship not correct? Feed back

QR Code

You can link related {{typeName}} from your personal space to this model item, or you can create a new {{typeName.toLowerCase()}}.

Model Content & Service

These authorship information will be submitted to the contributor to review.