SAGA-GIS Tool Library Documentation (v9.1.2)

Tool Function Plotter

Generate a grid based on a functional expression. The function interpreter uses an formula expression parser that offers the following operators:

+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, expects radians
cos(x)Cosine, expects radians
tan(x)Tangent, expects radians
asin(x)Arcsine, returns radians
acos(x)Arccosine, returns radians
atan(x)Arctangent, returns radians
atan2(x, y)Arctangent of x/y, returns radians
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

Parameters

 NameTypeIdentifierDescriptionConstraints
InputTarget System (*)Grid, input, optional, CMDTARGET_TEMPLATEuse this grid's system for output grids-
OutputFunctionGrid, outputFUNCTION--
OptionsFormulaTextFORMULA-Default: sin(x*x + y*y)
X RangeValue rangeX_RANGE--
Y RangeValue rangeY_RANGE--
Target Grid SystemChoiceTARGET_DEFINITION-Available Choices:
[0] user defined
[1] grid or grid system
Default: 0
CellsizeFloating pointTARGET_USER_SIZE-Minimum: 0.000000
Default: 1.000000
WestFloating pointTARGET_USER_XMIN-Default: 0.000000
EastFloating pointTARGET_USER_XMAX-Default: 100.000000
SouthFloating pointTARGET_USER_YMIN-Default: 0.000000
NorthFloating pointTARGET_USER_YMAX-Default: 100.000000
ColumnsIntegerTARGET_USER_COLSNumber of cells in East-West direction.Minimum: 1
Default: 101
RowsIntegerTARGET_USER_ROWSNumber of cells in North-South direction.Minimum: 1
Default: 101
FitChoiceTARGET_USER_FITS-Available Choices:
[0] nodes
[1] cells
Default: 0
Grid SystemGrid systemTARGET_SYSTEM--
(*) optional

Command-line

Usage: saga_cmd grid_calculus 4 [-FORMULA <str>] [-X_RANGE_MIN <double>] [-X_RANGE_MAX <double>] [-Y_RANGE_MIN <double>] [-Y_RANGE_MAX <double>] [-TARGET_DEFINITION <str>] [-TARGET_USER_SIZE <double>] [-TARGET_USER_XMIN <double>] [-TARGET_USER_XMAX <double>] [-TARGET_USER_YMIN <double>] [-TARGET_USER_YMAX <double>] [-TARGET_USER_COLS <num>] [-TARGET_USER_ROWS <num>] [-TARGET_USER_FITS <str>] [-TARGET_TEMPLATE <str>] [-FUNCTION <str>]
  -FORMULA:<str>            	Formula
	Text
	Default: sin(x*x + y*y)
  -X_RANGE_MIN:<double>     	X Range
	Value range
  -X_RANGE_MAX:<double>     	X Range
	Value range
  -Y_RANGE_MIN:<double>     	Y Range
	Value range
  -Y_RANGE_MAX:<double>     	Y Range
	Value range
  -TARGET_DEFINITION:<str>  	Target Grid System
	Choice
	Available Choices:
	[0] user defined
	[1] grid or grid system
	Default: 0
  -TARGET_USER_SIZE:<double>	Cellsize
	Floating point
	Minimum: 0.000000
	Default: 1.000000
  -TARGET_USER_XMIN:<double>	West
	Floating point
	Default: 0.000000
  -TARGET_USER_XMAX:<double>	East
	Floating point
	Default: 100.000000
  -TARGET_USER_YMIN:<double>	South
	Floating point
	Default: 0.000000
  -TARGET_USER_YMAX:<double>	North
	Floating point
	Default: 100.000000
  -TARGET_USER_COLS:<num>   	Columns
	Integer
	Minimum: 1
	Default: 101
  -TARGET_USER_ROWS:<num>   	Rows
	Integer
	Minimum: 1
	Default: 101
  -TARGET_USER_FITS:<str>   	Fit
	Choice
	Available Choices:
	[0] nodes
	[1] cells
	Default: 0
  -TARGET_TEMPLATE:<str>    	Target System
	Grid, input, optional, CMD
  -FUNCTION:<str>           	Function
	Grid, output