Skip to content

Commit ca0b7a2

Browse files
nyalldawsonalexbruy
authored andcommitted
Fix SAGA boolean parameters
1 parent 1787085 commit ca0b7a2

File tree

139 files changed

+247
-247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+247
-247
lines changed

python/plugins/processing/algs/saga/SagaAlgorithm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
QgsProcessingException,
3333
QgsMessageLog,
3434
QgsProcessingParameterRasterLayer,
35+
QgsProcessingParameterBoolean,
3536
QgsProcessingParameterNumber)
3637
from processing.core.ProcessingConfig import ProcessingConfig
3738
from processing.core.parameters import (getParameterFromString,
3839
ParameterExtent,
3940
ParameterVector,
4041
ParameterTable,
4142
ParameterMultipleInput,
42-
ParameterBoolean,
4343
ParameterFixedTable,
4444
ParameterSelection)
4545
from processing.core.outputs import (getOutputFromString,
@@ -226,7 +226,7 @@ def processAlgorithm(self, parameters, context, feedback):
226226
for layer in list(self.exportedLayers.keys()):
227227
s = s.replace(layer, self.exportedLayers[layer])
228228
command += ' -' + param.name() + ' "' + s + '"'
229-
elif isinstance(param, ParameterBoolean):
229+
elif isinstance(param, QgsProcessingParameterBoolean):
230230
if parameters[param.name()]:
231231
command += ' -' + param.name().strip() + " true"
232232
else:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ QgsProcessingParameterRasterLayer|CTRL_LINEAR|Linear Flow Control Grid|None|True
88
QgsProcessingParameterRasterDestination|FLUX|Flux
99
QgsProcessingParameterRasterDestination|STATE_OUT|State t + 1
1010
ParameterSelection|OPERATION|Operation|[0] accuflux;[1] accucapacityflux / state;[2] accufractionflux / state;[3] accuthresholdflux / state;[4] accutriggerflux / state| 0
11-
ParameterBoolean|LINEAR|Switch to Linear Flow|True
11+
QgsProcessingParameterBoolean|LINEAR|Switch to Linear Flow|True
1212
QgsProcessingParameterNumber|THRES_LINEAR|Threshold Linear Flow|QgsProcessingParameterNumber.Double|0.000000|False|None|None

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ shapes_polygons
33
ParameterVector|INPUT|Polygons|2|False
44
ParameterVector|POINTS|Points|0|False
55
ParameterTableField|FIELDS|Attributes|POINTS|-1|False
6-
ParameterBoolean|ADD_LOCATION_INFO|Add location info|False
6+
QgsProcessingParameterBoolean|ADD_LOCATION_INFO|Add location info|False
77
OutputVector|OUTPUT|Result

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ QgsProcessingParameterNumber|SEARCH_POINTS_MAX|Maximum|QgsProcessingParameterNum
1919
ParameterSelection|SEARCH_DIRECTION|Direction|[0] all directions;[1] quadrants| 0
2020
ParameterSelection|DW_WEIGHTING|Weighting Function|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting| 1
2121
QgsProcessingParameterNumber|DW_IDW_POWER|Inverse Distance Weighting Power|QgsProcessingParameterNumber.Double|2.000000|False| 0.000000|None
22-
ParameterBoolean|DW_IDW_OFFSET|Inverse Distance Offset|False
22+
QgsProcessingParameterBoolean|DW_IDW_OFFSET|Inverse Distance Offset|False
2323
QgsProcessingParameterNumber|DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|QgsProcessingParameterNumber.Double|1.000000|False| 0.000000|None

python/plugins/processing/algs/saga/description/ArtificialNeuralNetworkClassification(OpenCV).txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Artificial Neural Network Classification (OpenCV)
22
imagery_opencv
33
ParameterMultipleInput|FEATURES|Features|3|False
4-
ParameterBoolean|NORMALIZE|Normalize|False
4+
QgsProcessingParameterBoolean|NORMALIZE|Normalize|False
55
ParameterVector|TRAIN_AREAS|Training Areas|2|False
66
ParameterTable|TRAIN_CLASS|Class Identifier|False
77
QgsProcessingParameterRasterDestination|CLASSES|Classification

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ QgsProcessingParameterRasterLayer|BAND4|Landsat Band 4|None|False
66
QgsProcessingParameterRasterLayer|BAND5|Landsat Band 5|None|False
77
QgsProcessingParameterRasterLayer|BAND6|Landsat Band 6|None|False
88
QgsProcessingParameterRasterDestination|CLOUD|Cloud Cover
9-
ParameterBoolean|FILTER|Apply post-processing filter to remove small holes|True
9+
QgsProcessingParameterBoolean|FILTER|Apply post-processing filter to remove small holes|True
1010
QgsProcessingParameterNumber|B56C|B56 Composite (step 6)|QgsProcessingParameterNumber.Double|225.000000|False|None|None
1111
QgsProcessingParameterNumber|B45R|B45 Ratio: Desert detection (step 10)|QgsProcessingParameterNumber.Double|1.000000|False|None|None
12-
ParameterBoolean|CSIG|Always use cloud signature (step 14)|True
13-
ParameterBoolean|PASS2|Bypass second-pass processing, and merge warm (not ambiguous) and cold clouds|True
14-
ParameterBoolean|SHADOW|Include a category for cloud shadows|True
12+
QgsProcessingParameterBoolean|CSIG|Always use cloud signature (step 14)|True
13+
QgsProcessingParameterBoolean|PASS2|Bypass second-pass processing, and merge warm (not ambiguous) and cold clouds|True
14+
QgsProcessingParameterBoolean|SHADOW|Include a category for cloud shadows|True

python/plugins/processing/algs/saga/description/BoostingClassification(OpenCV).txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Boosting Classification (OpenCV)
22
imagery_opencv
33
ParameterMultipleInput|FEATURES|Features|3|False
4-
ParameterBoolean|NORMALIZE|Normalize|False
4+
QgsProcessingParameterBoolean|NORMALIZE|Normalize|False
55
ParameterVector|TRAIN_AREAS|Training Areas|-1|False
66
ParameterTable|TRAIN_CLASS|Class Identifier|False
77
QgsProcessingParameterRasterDestination|CLASSES|Classification
88
QgsProcessingParameterNumber|MAX_DEPTH|Maximum Tree Depth|QgsProcessingParameterNumber.Integer|10|False| 1|None
99
QgsProcessingParameterNumber|MIN_SAMPLES|Minimum Sample Count|QgsProcessingParameterNumber.Integer|2|False| 2|None
1010
QgsProcessingParameterNumber|MAX_CATEGRS|Maximum Categories|QgsProcessingParameterNumber.Integer|10|False| 1|None
11-
ParameterBoolean|1SE_RULE|Use 1SE Rule|True
12-
ParameterBoolean|TRUNC_PRUNED|Truncate Pruned Trees|True
11+
QgsProcessingParameterBoolean|1SE_RULE|Use 1SE Rule|True
12+
QgsProcessingParameterBoolean|TRUNC_PRUNED|Truncate Pruned Trees|True
1313
QgsProcessingParameterNumber|REG_ACCURACY|Regression Accuracy|QgsProcessingParameterNumber.Double|0.010000|False| 0.000000|None
1414
QgsProcessingParameterNumber|WEAK_COUNT|Weak Count|QgsProcessingParameterNumber.Integer|100|False| 0|None
1515
QgsProcessingParameterNumber|WGT_TRIM_RATE|Weight Trim Rate|QgsProcessingParameterNumber.Double|0.950000|False| 0.000000| 1.000000

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ParameterTable|FIN_LUT|Look-up Table|True
1010
ParameterTableField|FIN_LUT_MIN|Value|FIN_LUT|-1|False
1111
ParameterTableField|FIN_LUT_MAX|Value (Maximum)|FIN_LUT|-1|False
1212
ParameterTableField|FIN_LUT_NAM|Name|FIN_LUT|-1|False
13-
ParameterBoolean|NOCHANGE |Report Unchanged Classes|True
13+
QgsProcessingParameterBoolean|NOCHANGE |Report Unchanged Classes|True
1414
ParameterSelection|OUTPUT|Output as...|[0] cells;[1] percent;[2] area
1515
QgsProcessingParameterRasterDestination|CHANGE|Changes
1616
OutputTable|CHANGES|Changes

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ QgsProcessingParameterRasterLayer|MASK|Mask|None|True
55
QgsProcessingParameterNumber|MAXGAPCELLS|Only Process Gaps with Less Cells|QgsProcessingParameterNumber.Integer|0|False|None|None
66
QgsProcessingParameterNumber|MAXPOINTS|Maximum Points|QgsProcessingParameterNumber.Integer|1000|False|None|None
77
QgsProcessingParameterNumber|LOCALPOINTS|Number of Points for Local Interpolation|QgsProcessingParameterNumber.Integer|10|False|None|None
8-
ParameterBoolean|EXTENDED |Extended Neighourhood|True
8+
QgsProcessingParameterBoolean|EXTENDED |Extended Neighourhood|True
99
ParameterSelection|NEIGHBOURS|Neighbourhood|[0] Neumann;[1] Moore
1010
QgsProcessingParameterNumber|RADIUS|Radius (Cells)|QgsProcessingParameterNumber.Integer|0|False|None|None
1111
QgsProcessingParameterNumber|RELAXATION|Relaxation|QgsProcessingParameterNumber.Double|0.0|False|None|None

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ QgsProcessingParameterRasterLayer|MASK|Mask|None|True
55
QgsProcessingParameterRasterDestination|RESULT|Result
66
ParameterSelection|RESAMPLING|Resampling|[0] Nearest Neighbour;[1] Bilinear Interpolation;[2] Bicubic Spline Interpolation;[3] B-Spline Interpolation| 3
77
QgsProcessingParameterNumber|GROW|Grow Factor|QgsProcessingParameterNumber.Double|2.000000|False| 1.000000|None
8-
ParameterBoolean|PYRAMIDS|Use Pyramids|False
8+
QgsProcessingParameterBoolean|PYRAMIDS|Use Pyramids|False
99
ParameterSelection|START|Start Size|[0] grid cell size;[1] user defined size| 0
1010
QgsProcessingParameterNumber|START_SIZE|User Defined Size|QgsProcessingParameterNumber.Double|1.000000|False| 0.000000|None

0 commit comments

Comments
 (0)