SAGA 9.6.1 | Tool Library Documentation

Function Plotter


Description

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 Systemgrid, input, optionalTARGET_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 point numberTARGET_USER_SIZE-Minimum: 0.000000 Default: 1.000000
Westfloating point numberTARGET_USER_XMIN-Default: 0.000000
Eastfloating point numberTARGET_USER_XMAX-Default: 100.000000
Southfloating point numberTARGET_USER_YMIN-Default: 0.000000
Northfloating point numberTARGET_USER_YMAX-Default: 100.000000
Columnsinteger numberTARGET_USER_COLSNumber of cells in East-West direction.Minimum: 1 Default: 101
Rowsinteger numberTARGET_USER_ROWSNumber of cells in North-South direction.Minimum: 1 Default: 101
RoundingbooleanTARGET_USER_FLATRound bounding coordinates to multiples of cell size. Ignored if cell size has decimal places.Default: 1
FitchoiceTARGET_USER_FITS-Available Choices: [0] nodes [1] cells Default: 0
Grid Systemgrid systemTARGET_SYSTEM--

Command Line


Usage: saga_cmd grid_calculus 4 [-FORMULA ] [-X_RANGE_MIN ] [-X_RANGE_MAX ] [-Y_RANGE_MIN ] [-Y_RANGE_MAX ] [-TARGET_DEFINITION ] [-TARGET_USER_SIZE ] [-TARGET_USER_XMIN ] [-TARGET_USER_XMAX ] [-TARGET_USER_YMIN ] [-TARGET_USER_YMAX ] [-TARGET_USER_COLS ] [-TARGET_USER_ROWS ] [-TARGET_USER_FLAT ] [-TARGET_USER_FITS ] [-TARGET_TEMPLATE ] [-FUNCTION ]
  -FORMULA:            	Formula
	text
	Default: sin(x*x + y*y)
  -X_RANGE_MIN:     	X Range
	value range
  -X_RANGE_MAX:     	X Range
	value range
  -Y_RANGE_MIN:     	Y Range
	value range
  -Y_RANGE_MAX:     	Y Range
	value range
  -TARGET_DEFINITION:  	Target Grid System
	choice
	Available Choices:
	[0] user defined
	[1] grid or grid system
	Default: 0
  -TARGET_USER_SIZE:	Cellsize
	floating point number
	Minimum: 0.000000
	Default: 1.000000
  -TARGET_USER_XMIN:	West
	floating point number
	Default: 0.000000
  -TARGET_USER_XMAX:	East
	floating point number
	Default: 100.000000
  -TARGET_USER_YMIN:	South
	floating point number
	Default: 0.000000
  -TARGET_USER_YMAX:	North
	floating point number
	Default: 100.000000
  -TARGET_USER_COLS:   	Columns
	integer number
	Minimum: 1
	Default: 101
  -TARGET_USER_ROWS:   	Rows
	integer number
	Minimum: 1
	Default: 101
  -TARGET_USER_FLAT:   	Rounding
	boolean
	Default: 1
  -TARGET_USER_FITS:   	Fit
	choice
	Available Choices:
	[0] nodes
	[1] cells
	Default: 0
  -TARGET_TEMPLATE:    	Target System
	grid, input, optional
  -FUNCTION:           	Function
	grid, output