SAGA 9.3.3 | Tool Library Documentation

Shrink and Expand (Grid Collection)


Description

This is the multi-raster version of the 'Shrink and Expand' tool for single grids and applies the tool operation to each grid provided by the input grid collection. 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
InputInputgrid collection, inputINPUT--
OutputResultgrid collection, 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 41 [-OPERATION ] [-CIRCLE ] [-RADIUS ] [-EXPAND ] [-KEEP_TYPE ] [-ITERATIVE ] [-INPUT ] [-RESULT ]
  -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
  -INPUT:    	Input
	grid collection, input
  -RESULT:   	Result
	grid collection, output, optional