Skip to content

Commit 45f8b86

Browse files
committedJan 6, 2019
[processing][SAGA] Resync parameters for resample tool
And add tests Fixes #20882
1 parent f6c7cdb commit 45f8b86

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed
 

‎python/plugins/processing/algs/saga/description/Resampling.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ grid_tools
33
QgsProcessingParameterRasterLayer|INPUT|Grid|None|False
44
QgsProcessingParameterBoolean|KEEP_TYPE|Preserve Data Type|True
55
Hardcoded|-TARGET_DEFINITION 0
6-
QgsProcessingParameterEnum|SCALE_UP|Upscaling Method|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation;[5] Mean Value;[6] Mean Value (cell area weighted);[7] Minimum Value;[8] Maximum Value;[9] Majority
7-
QgsProcessingParameterEnum|SCALE_DOWN|Downscaling Method|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation
6+
QgsProcessingParameterEnum|SCALE_UP|Upscaling Method|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Bicubic Spline Interpolation;[3] B-Spline Interpolation;[4] Mean Value;[5] Mean Value (cell area weighted);[6] Minimum Value;[7] Maximum Value;[8] Majority|False|5
7+
QgsProcessingParameterEnum|SCALE_DOWN|Downscaling Method|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Bicubic Spline Interpolation;[3] B-Spline Interpolation|False|3
88
QgsProcessingParameterExtent|TARGET_USER_XMIN TARGET_USER_XMAX TARGET_USER_YMIN TARGET_USER_YMAX|Output extent|None|True
99
QgsProcessingParameterNumber|TARGET_USER_SIZE|Cellsize|QgsProcessingParameterNumber.Double|100.0|False|None|None
1010
QgsProcessingParameterEnum|TARGET_USER_FITS|Fit|[0] nodes;[1] cells

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

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,3 +564,50 @@ tests:
564564
name: expected/saga/zonal_grid_stats.dbf
565565
type: vector
566566

567+
- algorithm: saga:resampling
568+
name: Resample down
569+
params:
570+
INPUT:
571+
name: dem.tif
572+
type: raster
573+
KEEP_TYPE: true
574+
SCALE_DOWN: 3
575+
SCALE_UP: 5
576+
TARGET_USER_FITS: 0
577+
TARGET_USER_SIZE: 0.0005
578+
results:
579+
OUTPUT:
580+
hash: 1b3a17a724c489ea2eea60b39bc1b9c79778832bd41e982a4e9fb09f
581+
type: rasterhash
582+
583+
- algorithm: saga:resampling
584+
name: Resample up
585+
params:
586+
INPUT:
587+
name: dem.tif
588+
type: raster
589+
KEEP_TYPE: true
590+
SCALE_DOWN: 3
591+
SCALE_UP: 5
592+
TARGET_USER_FITS: 0
593+
TARGET_USER_SIZE: 5.0e-05
594+
results:
595+
OUTPUT:
596+
hash: 32008adf7520fee2848d689fcb53d0f8ac862bcd162575b03fefc7f1
597+
type: rasterhash
598+
599+
- algorithm: saga:resamplingfilter
600+
name: Resampling filter
601+
params:
602+
GRID:
603+
name: dem.tif
604+
type: raster
605+
SCALE: 10.0
606+
results:
607+
HIPASS:
608+
hash: cf992e69d506924bb59a5fbabd86617e263cb951a61c1b3c0b10012b
609+
type: rasterhash
610+
LOPASS:
611+
hash: f36069a8ceb7ffe839a34f66b82eebacb80143e9df4ed54485bf8293
612+
type: rasterhash
613+

0 commit comments

Comments
 (0)
Please sign in to comment.