Shrink and Expand
- Author: V.Wichmann & O.Conrad (c) 2011
- Menu: Grid | Gaps
Description
With this tool you can shrink and/or expand regions with valid data by a certain distance defined by the (kernel) radius. Shrinking just invalidates all (valid) data cells found within the given distance to no-data cells, while expansion replaces no-data cells with new values based on the evaluation of all (valid) data cells found within the neighbourhood as defined by the kernel. Both operations can be combined.
The method for the value expansion can be chosen as minimum, maximum, mean or majority value. The neighbourhood can be evaluated either at once or in a stepwise iterative way.
Parameters
| Name | Type | Identifier | Description | Constraints |
Input | Grid | grid, input | INPUT | - | - |
Output | Result | grid, output, optional | RESULT | - | - |
Options | Grid System | grid system | PARAMETERS_GRID_SYSTEM | - | - |
Operation | choice | OPERATION | - | Available Choices:
[0] shrink
[1] expand
[2] shrink and expand
[3] expand and shrink
Default: 3 |
Search Mode | choice | CIRCLE | Choose the shape of the kernel. | Available Choices:
[0] Square
[1] Circle
Default: 1 |
Radius | integer number | RADIUS | The kernel radius [cells]. | Minimum: 1
Default: 1 |
Method | choice | EXPAND | Choose how to fill no-data cells. | Available Choices:
[0] minimum
[1] maximum
[2] mean
[3] majority
Default: 3 |
Preserve Data Type | boolean | KEEP_TYPE | If false, mean value expansion results will be stored with floating point precision. | Default: 1 |
Iterative Expansion | boolean | ITERATIVE | If false, the neighbourhood for expansion is evaluated in one step, else expansion is done stepwise with a one cell radius for each iteration until desired kernel radius is reached. | Default: 0 |
Command Line
Usage: saga_cmd grid_tools 28 [-INPUT ] [-RESULT ] [-OPERATION ] [-CIRCLE ] [-RADIUS ] [-EXPAND ] [-KEEP_TYPE ] [-ITERATIVE ]
-INPUT: Grid
grid, input
-RESULT: Result
grid, output, optional
-OPERATION: Operation
choice
Available Choices:
[0] shrink
[1] expand
[2] shrink and expand
[3] expand and shrink
Default: 3
-CIRCLE: Search Mode
choice
Available Choices:
[0] Square
[1] Circle
Default: 1
-RADIUS: Radius
integer number
Minimum: 1
Default: 1
-EXPAND: Method
choice
Available Choices:
[0] minimum
[1] maximum
[2] mean
[3] majority
Default: 3
-KEEP_TYPE: Preserve Data Type
boolean
Default: 1
-ITERATIVE: Iterative Expansion
boolean
Default: 0