Wiki Markup |
---|
{alias:div}
h2. Name
*div* --- Divide a constant value into a dataset or divide a dataset by another
h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#ffffaa}
*div hi* _hiname_ ;# divide active dataset by workspace _hiname_ dataset, result in _hiname_.
*div lo* _hiname_ ;# divide active dataset by workspace _hiname_ dataset, result in active.
*div* _value_ ;# divide _value_ into active dataset, result in active data.
*div x | y | sca* _value_ ;# divide _value_ into x or y or scalar coordinates.
*div x | y | z | sca* \[_value_] *xx | yy | zz | sca* \[_factor_] ;# divide data coordinates by each other.
{panel}
h2. Description
The *div* command will divide a constant value with a dataset or divide two datasets by each other. *div* works on grid and polydata type of dataset. The result dataset is changed. Dividing by zero will be bypassed.
* *Grid*: The two datasets must have the same grid dimensions.
* *Polydata*: The two datasets must have the same number of points. For polydata the target for the divide operation can be any of the xyz coordinates and scalar values.
* *Dividing a datasets by another: The dataset in active is divided by the dataset in hiname. The result data is placed in active if the *lo* argument is used, and in the workspace _hiname_ if the *hi* argument is used.
{tip:title=Tip}
The command Function !att:_img_icon^calculator.png! is an alternative for mathematical operations on single datasets. Look inside the Geocap Toolbox for commands.
{tip}
h2. Arguments
*hi* _hiname_
{indent}Divide dataset in active and _hiname_ and the result data will be placed in workspace _hiname_.
{indent}
*lo* _hiname_
{indent}Divide dataset in active and _hiname_ and the result data will be placed in active workspace.
{indent}
_value_
{indent}Add _value_ and result data will be placed in the active workspace.
{indent}
*hi* | *lo* _hiname_ *tes*
{indent}Add two poly dataset together according to rules above and optionally test using the *tes* argument if xy coordinates are equal and then divide only for equal coordinates.
{indent}
*x* | *y* | *sca* _value_
{indent}Divide value to x- or y- or scalar coordinates. The result data will be placed in the active workspace.
{indent}
*x* | *y* | *z* | *sca* \[_value_\] *xx* | *yy* | *zz* \[_factor_\]
{indent}Divide _value_ to x or y or scalar coordinates. The result data will be placed in the active workspace. Divide data coordinate axes by each other. Optionally use a value that will be divided by the coordinates and/or a _factor_ that will be divided with the coordinates. *x* | *y* | *z* | *sca* represents the first data coordinates and *xx* | *yy* | *zz* represents the second data coordinates. The result is always placed in the first coordinates.
{indent}
h2. Examples
h3. Ex.1: Divide a dataset with another
{noformat:|borderWidth=1|bgColor=#eeeeee} |
Name
div — Divide a constant value into a dataset or divide a dataset by another
Syntax
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
div hi hiname ;# divide active dataset by workspace hiname dataset, result in hiname. div lo hiname ;# divide active dataset by workspace hiname dataset, result in active. div value ;# divide value into active dataset, result in active data. div x | y | sca value ;# divide value into x or y or scalar coordinates. div x | y | z | sca [value] xx | yy | zz | sca [factor] ;# divide data coordinates by each other. |
Description
The div command will divide a constant value with a dataset or divide two datasets by each other. div works on grid and polydata type of dataset. The result dataset is changed. Dividing by zero will be bypassed.
- Grid: The two datasets must have the same grid dimensions.
- Polydata: The two datasets must have the same number of points. For polydata the target for the divide operation can be any of the xyz coordinates and scalar values.
- Dividing a datasets by another: The dataset in active is divided by the dataset in hiname. The result data is placed in active if the *lo argument is used, and in the workspace hiname if the hi argument is used.
Tip | ||
---|---|---|
| ||
The command Function is an alternative for mathematical operations on single datasets. Look inside the Geocap Toolbox for commands. |
Arguments
hi hiname
lo hiname
value
hi | lo hiname tes
x | y | sca value
x | y | z | sca [value] xx | yy | zz [factor]
Examples
Ex.1: Divide a dataset with another
No Format | ||||
---|---|---|---|---|
| ||||
# Divide a grid in active with a grid in workspace named mygrid and place the result in active
div lo mygrid
{noformat}
h3. |
Ex.2:
...
Divide
...
a
...
dataset
...
with
...
a
...
value
...
No Format | ||||
---|---|---|---|---|
| ||||
# Divide the value 15 with a dataset in active
div 15
{noformat}
h3. |
Ex.3:
...
Divide
...
coordinates
...
No Format | ||||
---|---|---|---|---|
| ||||
# Divide x by y data coordinates and place the result in x data coordinates.
div x yy
{noformat}
h2. See also
[add - Add to dataset], [sub - Subtract operation], [mul - Multiply operation]
{pagebreak} |
See also
add - Add to dataset, sub - Subtract operation, mul - Multiply operation