SAGA-GIS Tool Library Documentation (v9.1.2)

Tool Shrink and Expand

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--
OutputResult (*)Grid, 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
RadiusIntegerRADIUSThe 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
(*) optional

Command-line

Usage: saga_cmd grid_tools 28 [-INPUT <str>] [-RESULT <str>] [-OPERATION <str>] [-CIRCLE <str>] [-RADIUS <num>] [-EXPAND <str>] [-KEEP_TYPE <str>] [-ITERATIVE <str>]
  -INPUT:<str>    	Grid
	Grid, input
  -RESULT:<str>   	Result
	Grid, output, optional
  -OPERATION:<str>	Operation
	Choice
	Available Choices:
	[0] shrink
	[1] expand
	[2] shrink and expand
	[3] expand and shrink
	Default: 3
  -CIRCLE:<str>   	Search Mode
	Choice
	Available Choices:
	[0] Square
	[1] Circle
	Default: 1
  -RADIUS:<num>   	Radius
	Integer
	Minimum: 1
	Default: 1
  -EXPAND:<str>   	Method
	Choice
	Available Choices:
	[0] minimum
	[1] maximum
	[2] mean
	[3] majority
	Default: 3
  -KEEP_TYPE:<str>	Preserve Data Type
	Boolean
	Default: 1
  -ITERATIVE:<str>	Iterative Expansion
	Boolean
	Default: 0