Skip to content

Commit c6bb3cd

Browse files
committed
[processing][saga] Fix cubic spline definition, add unit test
(cherry-picked from 43d3870)
1 parent 14540a9 commit c6bb3cd

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

python/plugins/processing/algs/saga/description/CubicSplineApproximation.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ QgsProcessingParameterField|FIELD|Attribute|None|SHAPES|-1|False|False
55
Hardcoded|-TARGET_DEFINITION 0
66
QgsProcessingParameterNumber|NPMIN|Minimal Number of Points|QgsProcessingParameterNumber.Integer|3|False|0|None
77
QgsProcessingParameterNumber|NPMAX|Maximal Number of Points|QgsProcessingParameterNumber.Integer|20|False|11|59
8-
QgsProcessingParameterNumber|NPPC|Points per Square|QgsProcessingParameterNumber.Integer|5|False|1|None
9-
QgsProcessingParameterNumber|K|Tolerance|QgsProcessingParameterNumber.Double|140.0|False|0|None
8+
QgsProcessingParameterNumber|NPPC|Points per Square|QgsProcessingParameterNumber.Double|5|False|1|None
9+
QgsProcessingParameterNumber|K|Tolerance|QgsProcessingParameterNumber.Integer|140|False|0|None
1010
QgsProcessingParameterExtent|TARGET_USER_XMIN TARGET_USER_XMAX TARGET_USER_YMIN TARGET_USER_YMAX|Output extent|None|True
11-
QgsProcessingParameterNumber|TARGET_USER_SIZE|Cellsize|QgsProcessingParameterNumber.Double|100.0|False|None|None
11+
QgsProcessingParameterNumber|TARGET_USER_SIZE|Cellsize|QgsProcessingParameterNumber.Double|1.0|False|0|None
1212
QgsProcessingParameterEnum|TARGET_USER_FITS|Fit|[0] nodes;[1] cells
1313
QgsProcessingParameterRasterDestination|TARGET_OUT_GRID|Grid

python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,3 +411,21 @@ tests:
411411
name: expected/saga/snap_points_to_points_result.shp
412412
type: vector
413413

414+
- algorithm: saga:interpolatecubicspline
415+
name: Cubic spline
416+
params:
417+
FIELD: fid
418+
K: 140
419+
NPMAX: 20
420+
NPMIN: 3
421+
NPPC: 2.0
422+
SHAPES:
423+
name: pointsz.gml
424+
type: vector
425+
TARGET_USER_FITS: 0
426+
TARGET_USER_SIZE: 0.5
427+
results:
428+
TARGET_OUT_GRID:
429+
hash: f4ac677152697773262aa1e5f69146a475139014ace77149966ec045
430+
type: rasterhash
431+

0 commit comments

Comments
 (0)