SAGA-GIS Tool Library Documentation (v8.2.1)

Tool Shrink and Expand

The tool allows one to shrink or expand regions with valid data by a certain distance (defined by the kernel radius). Shrinking just invalidates cells with valid data at the border to No Data regions, expanding sets No Data cells along the border of regions with valid data to a new valid value. The tool provides several options how to calculate this new value: minimum, maximum, mean or majority of the valid cells within the kernel.

Parameters

 NameTypeIdentifierDescriptionConstraints
InputGridGrid, inputINPUTThe input grid.-
OutputResult Grid (*)Grid, output, optionalRESULTThe output grid.-
OptionsGrid SystemGrid systemPARAMETERS_GRID_SYSTEM--
OperationChoiceOPERATIONChoose the type of operation.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
(*) optional

Command-line

Usage: saga_cmd grid_tools 28 [-INPUT <str>] [-RESULT <str>] [-OPERATION <str>] [-CIRCLE <str>] [-RADIUS <num>] [-EXPAND <str>] [-KEEP_TYPE <str>]
  -INPUT:<str>    	Grid
	Grid, input
  -RESULT:<str>   	Result Grid
	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