SAGA 9.14.0 | Tool Documentation

Close Gaps with Spline

Author(s) O.Conrad, V.Wichmann (c) 2010-2026
Library IDgrid_tools
Tool ID 25
Version 1.0
Menu Grid | Gaps

Description

The tool closes NoData gaps in a grid using thin plate spline interpolation based on cell values surrounding the gaps. You can specify the maximum gap size, in number of cells, that will be filled. Gap size can be evaluated using either an iterative or precomputed approach. The iterative approach determines the gap size while filling and is more efficient for smaller maximum gap sizes. For larger maximum gap sizes, the precomputed approach, which determines the gap size before filling, is much faster.

Parameters

 NameTypeIdentifierDescriptionConstraints
InputGridgrid, inputGRIDThe input grid.-
Maskgrid, input, optionalMASKAn optional mask grid. Masked cells are not closed.-
OutputClosed Gaps Gridgrid, output, optionalCLOSEDThe output grid.-
OptionsMaximum Gap Sizeinteger numberMAXGAPCELLSThe maximum gap size to be closed [number of cells]. Ignored if set to zero.Minimum: 0 Default: 0
Maximum Pointsinteger numberMAXPOINTSThe maximum number of points used for spline interpolation [-].Minimum: 2 Default: 1000
Number of Points for Local Interpolationinteger numberLOCALPOINTSThe number of nearest neighbours used for spline interpolation [-].Minimum: 2 Default: 20
Extended NeighbourhoodbooleanEXTENDEDThe extended neighbourhood not only includes the immediate neighbouring cells of a gap, but also their neighbours.Default: 0
NeighbourhoodchoiceNEIGHBOURSThe analysed neighbourhood, either the four cardinal neighbours or all eight neighbours.Available Choices: [0] Neumann [1] Moore Default: 0
Radiusinteger numberRADIUSThe nearest neighbour search radius [map units]. If zero, simply the nearest 'Number of Points for Local Interpolation' are used.Minimum: 0 Default: 0
Relaxationfloating point numberRELAXATIONThe regularization parameter controlling the amount of smoothing [-]. If the value is zero, exact interpolation is used.Minimum: 0.000000 Default: 0
Gap Size EvaluationchoiceGAPSIZEEVALChoose how to evaluate the gap size.Available Choices: [0] iterative [1] precomputed Default: 0

Command Line


Usage: saga_cmd grid_tools 25 [-GRID ] [-MASK ] [-MAXGAPCELLS ] [-CLOSED ] [-MAXPOINTS ] [-LOCALPOINTS ] [-EXTENDED ] [-NEIGHBOURS ] [-RADIUS ] [-RELAXATION ] [-GAPSIZEEVAL ]
  -GRID:            Grid
	grid, input
  -MASK:            Mask
	grid, input, optional
  -MAXGAPCELLS:     Maximum Gap Size
	integer number
	Minimum: 0
	Default: 0
  -CLOSED:          Closed Gaps Grid
	grid, output, optional
  -MAXPOINTS:       Maximum Points
	integer number
	Minimum: 2
	Default: 1000
  -LOCALPOINTS:     Number of Points for Local Interpolation
	integer number
	Minimum: 2
	Default: 20
  -EXTENDED:        Extended Neighbourhood
	boolean
	Default: 0
  -NEIGHBOURS:      Neighbourhood
	choice
	Available Choices:
	[0] Neumann
	[1] Moore
	Default: 0
  -RADIUS:          Radius
	integer number
	Minimum: 0
	Default: 0
  -RELAXATION:   Relaxation
	floating point number
	Minimum: 0.000000
	Default: 0
  -GAPSIZEEVAL:     Gap Size Evaluation
	choice
	Available Choices:
	[0] iterative
	[1] precomputed
	Default: 0