SAGA 9.4.2 | Tool Library Documentation

Shrink and Expand


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

 NameTypeIdentifierDescriptionConstraints
InputGridgrid, inputINPUT--
OutputResultgrid, output, optionalRESULT--
OptionsGrid Systemgrid systemPARAMETERS_GRID_SYSTEM--
OperationchoiceOPERATION-Available Choices: [0] shrink [1] expand [2] shrink and expand [3] expand and shrink Default: 3
Search ModechoiceCIRCLEChoose the shape of the kernel.Available Choices: [0] Square [1] Circle Default: 1
Radiusinteger numberRADIUSThe kernel radius [cells].Minimum: 1 Default: 1
MethodchoiceEXPANDChoose how to fill no-data cells.Available Choices: [0] minimum [1] maximum [2] mean [3] majority Default: 3
Preserve Data TypebooleanKEEP_TYPEIf false, mean value expansion results will be stored with floating point precision.Default: 1
Iterative ExpansionbooleanITERATIVEIf 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