Close Gaps with Spline
| Author(s) | O.Conrad, V.Wichmann (c) 2010-2026 |
| Library ID | grid_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
| | Name | Type | Identifier | Description | Constraints |
| Input | Grid | grid, input | GRID | The input grid. | - |
| Mask | grid, input, optional | MASK | An optional mask grid. Masked cells are not closed. | - |
| Output | Closed Gaps Grid | grid, output, optional | CLOSED | The output grid. | - |
| Options | Maximum Gap Size | integer number | MAXGAPCELLS | The maximum gap size to be closed [number of cells]. Ignored if set to zero. | Minimum: 0
Default: 0 |
| Maximum Points | integer number | MAXPOINTS | The maximum number of points used for spline interpolation [-]. | Minimum: 2
Default: 1000 |
| Number of Points for Local Interpolation | integer number | LOCALPOINTS | The number of nearest neighbours used for spline interpolation [-]. | Minimum: 2
Default: 20 |
| Extended Neighbourhood | boolean | EXTENDED | The extended neighbourhood not only includes the immediate neighbouring cells of a gap, but also their neighbours. | Default: 0 |
| Neighbourhood | choice | NEIGHBOURS | The analysed neighbourhood, either the four cardinal neighbours or all eight neighbours. | Available Choices:
[0] Neumann
[1] Moore
Default: 0 |
| Radius | integer number | RADIUS | The nearest neighbour search radius [map units]. If zero, simply the nearest 'Number of Points for Local Interpolation' are used. | Minimum: 0
Default: 0 |
| Relaxation | floating point number | RELAXATION | The regularization parameter controlling the amount of smoothing [-]. If the value is zero, exact interpolation is used. | Minimum: 0.000000
Default: 0 |
| Gap Size Evaluation | choice | GAPSIZEEVAL | Choose 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