SAGA.grid_calculus.1: Grid Calculator

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

Inputs

Resampling

string

Formula

string

Name

string

Take Formula

boolean

Check this in order to include no-data cells in the calculation.

boolean

Data Type

string

in the formula these grids are addressed in order of the list as 'g1, g2, g3, ...'

format
href
Please set a value for GRIDS.

in the formula these grids are addressed in order of the list as 'h1, h2, h3, ...'

format
href
Please set a value for XGRIDS.

Outputs

Result

format
transmission

Execution options

successUri
inProgressUri
failedUri

format

mode

Execute End Point

View the execution endpoint of a process.

View the alternative version in HTML.

{"id": "SAGA.grid_calculus.1", "title": "Grid Calculator", "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.<br/><br/>Example:\t sin(g1) * g2 + 2 * h1<br/><br/>The following operators are available for the formula definition:<br/><table border=\"0\"><tr><td><b>+</b></td><td>Addition</td></tr><tr><td><b>-</b></td><td>Subtraction</td></tr><tr><td><b>*</b></td><td>Multiplication</td></tr><tr><td><b>/</b></td><td>Division</td></tr><tr><td><b>abs(x)</b></td><td>Absolute Value</td></tr><tr><td><b>mod(x, y)</b></td><td>Returns the floating point remainder of x/y</td></tr><tr><td><b>int(x)</b></td><td>Returns the integer part of floating point value x</td></tr><tr><td><b>sqr(x)</b></td><td>Square</td></tr><tr><td><b>sqrt(x)</b></td><td>Square Root</td></tr><tr><td><b>exp(x)</b></td><td>Exponential</td></tr><tr><td><b>pow(x, y)</b></td><td>Returns x raised to the power of y</td></tr><tr><td><b>x ^ y</b></td><td>Returns x raised to the power of y</td></tr><tr><td><b>ln(x)</b></td><td>Natural Logarithm</td></tr><tr><td><b>log(x)</b></td><td>Base 10 Logarithm</td></tr><tr><td><b>pi()</b></td><td>Returns the value of Pi</td></tr><tr><td><b>sin(x)</b></td><td>Sine</td></tr><tr><td><b>cos(x)</b></td><td>Cosine</td></tr><tr><td><b>tan(x)</b></td><td>Tangent</td></tr><tr><td><b>asin(x)</b></td><td>Arcsine</td></tr><tr><td><b>acos(x)</b></td><td>Arccosine</td></tr><tr><td><b>atan(x)</b></td><td>Arctangent</td></tr><tr><td><b>atan2(x, y)</b></td><td>Arctangent of x/y</td></tr><tr><td><b>min(x, y)</b></td><td>Returns the minimum of values x and y</td></tr><tr><td><b>max(x, y)</b></td><td>Returns the maximum of values x and y</td></tr><tr><td><b>gt(x, y)</b></td><td>Returns true (1), if x is greater than y, else false (0)</td></tr><tr><td><b>x > y</b></td><td>Returns true (1), if x is greater than y, else false (0)</td></tr><tr><td><b>lt(x, y)</b></td><td>Returns true (1), if x is less than y, else false (0)</td></tr><tr><td><b>x < y</b></td><td>Returns true (1), if x is less than y, else false (0)</td></tr><tr><td><b>eq(x, y)</b></td><td>Returns true (1), if x equals y, else false (0)</td></tr><tr><td><b>x = y</b></td><td>Returns true (1), if x equals y, else false (0)</td></tr><tr><td><b>and(x, y)</b></td><td>Returns true (1), if both x and y are true (i.e. not 0)</td></tr><tr><td><b>or(x, y)</b></td><td>Returns true (1), if at least one of both x and y is true (i.e. not 0)</td></tr><tr><td><b>ifelse(c, x, y)</b></td><td>Returns x, if condition c is true (i.e. not 0), else y</td></tr><tr><td><b>rand_u(x, y)</b></td><td>Random number, uniform distribution with minimum x and maximum y</td></tr><tr><td><b>rand_g(x, y)</b></td><td>Random number, Gaussian distribution with mean x and standard deviation y</td></tr><tr><td><b>xpos(), ypos()</b></td><td>Get the x/y coordinates for the current cell</td></tr><tr><td><b>col(), row()</b></td><td>Get the current cell's column/row index</td></tr><tr><td><b>ncols(), nrows()</b></td><td>Get the number of columns/rows</td></tr><tr><td><b>nodata()</b></td><td>Returns resulting grid's no-data value</td></tr></table>", "version": "1.0.0", "jobControlOptions": ["sync-execute", "async-execute", "dismiss"], "outputTransmission": ["value", "reference"], "links": [{"rel": "http://www.opengis.net/def/rel/ogc/1.0/execute", "type": "application/json", "title": "Execute End Point", "href": "http://tb17.geolabs.fr:8111/ogc-api/processes/SAGA.grid_calculus.1/execution"}, {"rel": "alternate", "type": "text/html", "title": "Execute End Point", "href": "http://tb17.geolabs.fr:8111/ogc-api/processes/SAGA.grid_calculus.1/execution.html"}], "inputs": {"RESAMPLING": {"title": "Resampling", "description": "Resampling", "schema": {"type": "string", "default": "B-Spline Interpolation", "enum": ["Nearest Neighbour", "Bilinear Interpolation", "Bicubic Spline Interpolation", "B-Spline Interpolation"], "nullable": true}, "id": "RESAMPLING"}, "FORMULA": {"title": "Formula", "description": "Formula", "schema": {"type": "string", "default": "Any value", "nullable": true}, "id": "FORMULA"}, "NAME": {"title": "Name", "description": "Name", "schema": {"type": "string", "default": "Any value", "nullable": true}, "id": "NAME"}, "FNAME": {"title": "Take Formula", "description": "Take Formula", "schema": {"type": "boolean", "default": false, "nullable": true}, "id": "FNAME"}, "USE_NODATA": {"title": "Use No-Data", "description": "Check this in order to include no-data cells in the calculation.", "schema": {"type": "boolean", "default": false, "nullable": true}, "id": "USE_NODATA"}, "TYPE": {"title": "Data Type", "description": "Data Type", "schema": {"type": "string", "default": "4 byte floating point number", "enum": ["bit", "unsigned 1 byte integer", "signed 1 byte integer", "unsigned 2 byte integer", "signed 2 byte integer", "unsigned 4 byte integer", "signed 4 byte integer", "4 byte floating point number", "8 byte floating point number"], "nullable": true}, "id": "TYPE"}, "GRIDS": {"title": "Grids", "description": "in the formula these grids are addressed in order of the list as 'g1, g2, g3, ...'", "maxOccurs": 1024, "extended-schema": {"type": "array", "minItems": 0, "maxItems": 1024, "items": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["image/tiff", "application/x-ogc-envi", "application/x-ogc-aaigrid", "image/png"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-envi"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-aaigrid"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}}}]}, "nullable": true}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-envi"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-aaigrid"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}, "id": "GRIDS"}, "XGRIDS": {"title": "Grids from different Systems", "description": "in the formula these grids are addressed in order of the list as 'h1, h2, h3, ...'", "maxOccurs": 1024, "extended-schema": {"type": "array", "minItems": 0, "maxItems": 1024, "items": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["image/tiff", "application/x-ogc-envi", "application/x-ogc-aaigrid", "image/png"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-envi"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-aaigrid"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}}}]}, "nullable": true}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-envi"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-aaigrid"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}, "id": "XGRIDS"}}, "outputs": {"RESULT": {"title": "Result", "description": "Result", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["image/tiff", "application/x-ogc-envi", "application/x-ogc-aaigrid", "image/png"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-envi"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-aaigrid"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}}}]}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-envi"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "application/x-ogc-aaigrid"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}, "id": "RESULT"}}}

http://tb17.geolabs.fr:8111/ogc-api/processes/SAGA.grid_calculus.1.html
Last modified: Sat Dec 4 00:09:36 CET 2021