Skip to content
Permalink
Browse files
Fix SAGA boolean parameters
  • Loading branch information
nyalldawson authored and alexbruy committed Nov 9, 2017
1 parent 1787085 commit ca0b7a263929b9fec44b911bc6c4ecaaa5d58e4a
Show file tree
Hide file tree
Showing 139 changed files with 247 additions and 247 deletions.
@@ -32,14 +32,14 @@
QgsProcessingException,
QgsMessageLog,
QgsProcessingParameterRasterLayer,
QgsProcessingParameterBoolean,
QgsProcessingParameterNumber)
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.parameters import (getParameterFromString,
ParameterExtent,
ParameterVector,
ParameterTable,
ParameterMultipleInput,
ParameterBoolean,
ParameterFixedTable,
ParameterSelection)
from processing.core.outputs import (getOutputFromString,
@@ -226,7 +226,7 @@ def processAlgorithm(self, parameters, context, feedback):
for layer in list(self.exportedLayers.keys()):
s = s.replace(layer, self.exportedLayers[layer])
command += ' -' + param.name() + ' "' + s + '"'
elif isinstance(param, ParameterBoolean):
elif isinstance(param, QgsProcessingParameterBoolean):
if parameters[param.name()]:
command += ' -' + param.name().strip() + " true"
else:
@@ -8,5 +8,5 @@ QgsProcessingParameterRasterLayer|CTRL_LINEAR|Linear Flow Control Grid|None|True
QgsProcessingParameterRasterDestination|FLUX|Flux
QgsProcessingParameterRasterDestination|STATE_OUT|State t + 1
ParameterSelection|OPERATION|Operation|[0] accuflux;[1] accucapacityflux / state;[2] accufractionflux / state;[3] accuthresholdflux / state;[4] accutriggerflux / state| 0
ParameterBoolean|LINEAR|Switch to Linear Flow|True
QgsProcessingParameterBoolean|LINEAR|Switch to Linear Flow|True
QgsProcessingParameterNumber|THRES_LINEAR|Threshold Linear Flow|QgsProcessingParameterNumber.Double|0.000000|False|None|None
@@ -3,5 +3,5 @@ shapes_polygons
ParameterVector|INPUT|Polygons|2|False
ParameterVector|POINTS|Points|0|False
ParameterTableField|FIELDS|Attributes|POINTS|-1|False
ParameterBoolean|ADD_LOCATION_INFO|Add location info|False
QgsProcessingParameterBoolean|ADD_LOCATION_INFO|Add location info|False
OutputVector|OUTPUT|Result
@@ -19,5 +19,5 @@ QgsProcessingParameterNumber|SEARCH_POINTS_MAX|Maximum|QgsProcessingParameterNum
ParameterSelection|SEARCH_DIRECTION|Direction|[0] all directions;[1] quadrants| 0
ParameterSelection|DW_WEIGHTING|Weighting Function|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting| 1
QgsProcessingParameterNumber|DW_IDW_POWER|Inverse Distance Weighting Power|QgsProcessingParameterNumber.Double|2.000000|False| 0.000000|None
ParameterBoolean|DW_IDW_OFFSET|Inverse Distance Offset|False
QgsProcessingParameterBoolean|DW_IDW_OFFSET|Inverse Distance Offset|False
QgsProcessingParameterNumber|DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|QgsProcessingParameterNumber.Double|1.000000|False| 0.000000|None
@@ -1,7 +1,7 @@
Artificial Neural Network Classification (OpenCV)
imagery_opencv
ParameterMultipleInput|FEATURES|Features|3|False
ParameterBoolean|NORMALIZE|Normalize|False
QgsProcessingParameterBoolean|NORMALIZE|Normalize|False
ParameterVector|TRAIN_AREAS|Training Areas|2|False
ParameterTable|TRAIN_CLASS|Class Identifier|False
QgsProcessingParameterRasterDestination|CLASSES|Classification
@@ -6,9 +6,9 @@ QgsProcessingParameterRasterLayer|BAND4|Landsat Band 4|None|False
QgsProcessingParameterRasterLayer|BAND5|Landsat Band 5|None|False
QgsProcessingParameterRasterLayer|BAND6|Landsat Band 6|None|False
QgsProcessingParameterRasterDestination|CLOUD|Cloud Cover
ParameterBoolean|FILTER|Apply post-processing filter to remove small holes|True
QgsProcessingParameterBoolean|FILTER|Apply post-processing filter to remove small holes|True
QgsProcessingParameterNumber|B56C|B56 Composite (step 6)|QgsProcessingParameterNumber.Double|225.000000|False|None|None
QgsProcessingParameterNumber|B45R|B45 Ratio: Desert detection (step 10)|QgsProcessingParameterNumber.Double|1.000000|False|None|None
ParameterBoolean|CSIG|Always use cloud signature (step 14)|True
ParameterBoolean|PASS2|Bypass second-pass processing, and merge warm (not ambiguous) and cold clouds|True
ParameterBoolean|SHADOW|Include a category for cloud shadows|True
QgsProcessingParameterBoolean|CSIG|Always use cloud signature (step 14)|True
QgsProcessingParameterBoolean|PASS2|Bypass second-pass processing, and merge warm (not ambiguous) and cold clouds|True
QgsProcessingParameterBoolean|SHADOW|Include a category for cloud shadows|True
@@ -1,15 +1,15 @@
Boosting Classification (OpenCV)
imagery_opencv
ParameterMultipleInput|FEATURES|Features|3|False
ParameterBoolean|NORMALIZE|Normalize|False
QgsProcessingParameterBoolean|NORMALIZE|Normalize|False
ParameterVector|TRAIN_AREAS|Training Areas|-1|False
ParameterTable|TRAIN_CLASS|Class Identifier|False
QgsProcessingParameterRasterDestination|CLASSES|Classification
QgsProcessingParameterNumber|MAX_DEPTH|Maximum Tree Depth|QgsProcessingParameterNumber.Integer|10|False| 1|None
QgsProcessingParameterNumber|MIN_SAMPLES|Minimum Sample Count|QgsProcessingParameterNumber.Integer|2|False| 2|None
QgsProcessingParameterNumber|MAX_CATEGRS|Maximum Categories|QgsProcessingParameterNumber.Integer|10|False| 1|None
ParameterBoolean|1SE_RULE|Use 1SE Rule|True
ParameterBoolean|TRUNC_PRUNED|Truncate Pruned Trees|True
QgsProcessingParameterBoolean|1SE_RULE|Use 1SE Rule|True
QgsProcessingParameterBoolean|TRUNC_PRUNED|Truncate Pruned Trees|True
QgsProcessingParameterNumber|REG_ACCURACY|Regression Accuracy|QgsProcessingParameterNumber.Double|0.010000|False| 0.000000|None
QgsProcessingParameterNumber|WEAK_COUNT|Weak Count|QgsProcessingParameterNumber.Integer|100|False| 0|None
QgsProcessingParameterNumber|WGT_TRIM_RATE|Weight Trim Rate|QgsProcessingParameterNumber.Double|0.950000|False| 0.000000| 1.000000
@@ -10,7 +10,7 @@ ParameterTable|FIN_LUT|Look-up Table|True
ParameterTableField|FIN_LUT_MIN|Value|FIN_LUT|-1|False
ParameterTableField|FIN_LUT_MAX|Value (Maximum)|FIN_LUT|-1|False
ParameterTableField|FIN_LUT_NAM|Name|FIN_LUT|-1|False
ParameterBoolean|NOCHANGE |Report Unchanged Classes|True
QgsProcessingParameterBoolean|NOCHANGE |Report Unchanged Classes|True
ParameterSelection|OUTPUT|Output as...|[0] cells;[1] percent;[2] area
QgsProcessingParameterRasterDestination|CHANGE|Changes
OutputTable|CHANGES|Changes
@@ -5,7 +5,7 @@ QgsProcessingParameterRasterLayer|MASK|Mask|None|True
QgsProcessingParameterNumber|MAXGAPCELLS|Only Process Gaps with Less Cells|QgsProcessingParameterNumber.Integer|0|False|None|None
QgsProcessingParameterNumber|MAXPOINTS|Maximum Points|QgsProcessingParameterNumber.Integer|1000|False|None|None
QgsProcessingParameterNumber|LOCALPOINTS|Number of Points for Local Interpolation|QgsProcessingParameterNumber.Integer|10|False|None|None
ParameterBoolean|EXTENDED |Extended Neighourhood|True
QgsProcessingParameterBoolean|EXTENDED |Extended Neighourhood|True
ParameterSelection|NEIGHBOURS|Neighbourhood|[0] Neumann;[1] Moore
QgsProcessingParameterNumber|RADIUS|Radius (Cells)|QgsProcessingParameterNumber.Integer|0|False|None|None
QgsProcessingParameterNumber|RELAXATION|Relaxation|QgsProcessingParameterNumber.Double|0.0|False|None|None
@@ -5,6 +5,6 @@ QgsProcessingParameterRasterLayer|MASK|Mask|None|True
QgsProcessingParameterRasterDestination|RESULT|Result
ParameterSelection|RESAMPLING|Resampling|[0] Nearest Neighbour;[1] Bilinear Interpolation;[2] Bicubic Spline Interpolation;[3] B-Spline Interpolation| 3
QgsProcessingParameterNumber|GROW|Grow Factor|QgsProcessingParameterNumber.Double|2.000000|False| 1.000000|None
ParameterBoolean|PYRAMIDS|Use Pyramids|False
QgsProcessingParameterBoolean|PYRAMIDS|Use Pyramids|False
ParameterSelection|START|Start Size|[0] grid cell size;[1] user defined size| 0
QgsProcessingParameterNumber|START_SIZE|User Defined Size|QgsProcessingParameterNumber.Double|1.000000|False| 0.000000|None
@@ -7,4 +7,4 @@ ParameterTable|CLUSTER|Cluster|False
ParameterTable|STATISTICS|Statistics|False
ParameterSelection|METHOD|Method|[0] Iterative Minimum Distance (Forgy 1965);[1] Hill-Climbing (Rubin 1967);[2] Combined Minimum Distance / Hillclimbing| 1
QgsProcessingParameterNumber|NCLUSTER|Clusters|QgsProcessingParameterNumber.Integer|10|False| 2|None
ParameterBoolean|NORMALISE|Normalise|False
QgsProcessingParameterBoolean|NORMALISE|Normalise|False
@@ -7,4 +7,4 @@ ParameterTable|CLUSTER|Cluster|False
ParameterTable|STATISTICS|Statistics|False
ParameterSelection|METHOD|Method|[0] Iterative Minimum Distance (Forgy 1965);[1] Hill-Climbing (Rubin 1967);[2] Combined Minimum Distance / Hillclimbing| 1
QgsProcessingParameterNumber|NCLUSTER|Clusters|QgsProcessingParameterNumber.Integer|10|False| 2|None
ParameterBoolean|NORMALISE|Normalise|False
QgsProcessingParameterBoolean|NORMALISE|Normalise|False
@@ -4,8 +4,8 @@ ParameterMultipleInput|GRIDS|Grids|3.0|False
ParameterSelection|METHOD|Method|[0] Iterative Minimum Distance (Forgy 1965);[1] Hill-Climbing (Rubin 1967);[2] Combined Minimum Distance / Hillclimbing
QgsProcessingParameterNumber|NCLUSTER|Clusters|QgsProcessingParameterNumber.Integer|10|False|2|None
QgsProcessingParameterNumber|MAXITER|Maximum Iterations|QgsProcessingParameterNumber.Integer|0|False|0|None
ParameterBoolean|NORMALISE|Normalise|True
ParameterBoolean|OLDVERSION|Old Version|False
ParameterBoolean|UPDATEVIEW|Update View|False
QgsProcessingParameterBoolean|NORMALISE|Normalise|True
QgsProcessingParameterBoolean|OLDVERSION|Old Version|False
QgsProcessingParameterBoolean|UPDATEVIEW|Update View|False
QgsProcessingParameterRasterDestination|CLUSTER|Clusters
OutputTable|STATISTICS|Statistics
@@ -11,7 +11,7 @@ ParameterTable|TWO_LUT_MIN|Value|False
ParameterTable|TWO_LUT_MAX|Value (Maximum)|False
ParameterTable|TWO_LUT_NAM|Name|False
QgsProcessingParameterRasterDestination|COMBINED|Combined Classes
ParameterBoolean|NOCHANGE|Report Unchanged Classes|True
QgsProcessingParameterBoolean|NOCHANGE|Report Unchanged Classes|True
ParameterTable|CONFUSION|Confusion Matrix|False
ParameterSelection|OUTPUT|Output as...|[0] cells;[1] percent;[2] area| 0
ParameterTable|CLASSES|Class Values|False
@@ -2,9 +2,9 @@ Connectivity Analysis
grid_filter
QgsProcessingParameterRasterLayer|INPUT_GRID|Input Binary Grid|None|False
QgsProcessingParameterRasterDestination|FILTERED_MASK|Filtered Image
ParameterBoolean|FILTER|Apply Filter?|True
QgsProcessingParameterBoolean|FILTER|Apply Filter?|True
QgsProcessingParameterNumber|SIZE|Filter Size (Radius)|QgsProcessingParameterNumber.Integer|3|False|None|None
QgsProcessingParameterRasterDestination|SYMBOLIC_IMAGE|Symbolic Image
OutputVector|OUTLINES|Outlines
ParameterBoolean|BORDER_PIXEL_CENTERS|Pixel Centers?|False
ParameterBoolean|REMOVE_MARGINAL_REGIONS|Remove Border Regions?|False
QgsProcessingParameterBoolean|BORDER_PIXEL_CENTERS|Pixel Centers?|False
QgsProcessingParameterBoolean|REMOVE_MARGINAL_REGIONS|Remove Border Regions?|False
@@ -4,8 +4,8 @@ QgsProcessingParameterRasterLayer|ELEVATION|Elevation|None|False
QgsProcessingParameterNumber|RADIUS|Radius [Cells]|QgsProcessingParameterNumber.Double|10.0|False|1.0|None
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Weighting Function|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
QgsProcessingParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|QgsProcessingParameterNumber.Double|1.0|False|0.0|None
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
QgsProcessingParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
QgsProcessingParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|QgsProcessingParameterNumber.Double|1.0|False|0.0|None
ParameterBoolean|SLOPE|Gradient|True
QgsProcessingParameterBoolean|SLOPE|Gradient|True
ParameterSelection|DIFFERENCE|Weighting Function|[0] direction to the center cell;[1] center cell's aspect direction
QgsProcessingParameterRasterDestination|CONVERGENCE|Convergence Index
@@ -1,6 +1,6 @@
Convert Lines to Points
shapes_points
ParameterVector|LINES|Lines|1|False
ParameterBoolean|ADD |Insert Additional Points|True
QgsProcessingParameterBoolean|ADD |Insert Additional Points|True
QgsProcessingParameterNumber|DIST|Insert Distance|QgsProcessingParameterNumber.Double|1.0|False|0.0|None
OutputVector|POINTS|Points
@@ -3,6 +3,6 @@ grid_filter
QgsProcessingParameterRasterLayer|INPUT|Grid to filter|None|False
QgsProcessingParameterNumber|RADIUS|Search Radius|QgsProcessingParameterNumber.Integer|2|False|1.0|None
QgsProcessingParameterNumber|TERRAINSLOPE|Approx. Terrain Slope|QgsProcessingParameterNumber.Double|30.0|False|None|None
ParameterBoolean|STDDEV |Use Confidence Interval|True
QgsProcessingParameterBoolean|STDDEV |Use Confidence Interval|True
QgsProcessingParameterRasterDestination|GROUND|Bare Earth
QgsProcessingParameterRasterDestination|NONGROUND|Removed Objects
@@ -1,13 +1,13 @@
Decision Tree Classification (OpenCV)
imagery_opencv
ParameterMultipleInput|FEATURES|Features|3|False
ParameterBoolean|NORMALIZE|Normalize|False
QgsProcessingParameterBoolean|NORMALIZE|Normalize|False
ParameterVector|TRAIN_AREAS|Training Areas|-1|False
ParameterTable|TRAIN_CLASS|Class Identifier|False
QgsProcessingParameterRasterDestination|CLASSES|Classification
QgsProcessingParameterNumber|MAX_DEPTH|Maximum Tree Depth|QgsProcessingParameterNumber.Integer|10|False| 1|None
QgsProcessingParameterNumber|MIN_SAMPLES|Minimum Sample Count|QgsProcessingParameterNumber.Integer|2|False| 2|None
QgsProcessingParameterNumber|MAX_CATEGRS|Maximum Categories|QgsProcessingParameterNumber.Integer|10|False| 1|None
ParameterBoolean|1SE_RULE|Use 1SE Rule|True
ParameterBoolean|TRUNC_PRUNED|Truncate Pruned Trees|True
QgsProcessingParameterBoolean|1SE_RULE|Use 1SE Rule|True
QgsProcessingParameterBoolean|TRUNC_PRUNED|Truncate Pruned Trees|True
QgsProcessingParameterNumber|REG_ACCURACY|Regression Accuracy|QgsProcessingParameterNumber.Double|0.010000|False| 0.000000|None
@@ -3,4 +3,4 @@ shapes_polygons
ParameterVector|A|Layer A|-1|False
ParameterVector|B|Layer B|-1|False
OutputVector|RESULT|Difference
ParameterBoolean|SPLIT|Split Parts|True
QgsProcessingParameterBoolean|SPLIT|Split Parts|True
@@ -2,7 +2,7 @@ Diffusive Hillslope Evolution (ADI)
sim_qm_of_esp
QgsProcessingParameterRasterLayer|DEM|Elevation|None|False
QgsProcessingParameterRasterLayer|CHANNELS|Channel Mask|None|True
ParameterBoolean|UPDATE|Update|True
QgsProcessingParameterBoolean|UPDATE|Update|True
QgsProcessingParameterNumber|KAPPA|Diffusivity [m2/kyr]|QgsProcessingParameterNumber.Double|10.0|False|0.0|None
QgsProcessingParameterNumber|DURATION|Simulation Time [kyr]|QgsProcessingParameterNumber.Double|10000.0|False|0.0|None
ParameterSelection|TIMESTEP|Time Step|[0] user defined;[1] automatically|1
@@ -1,7 +1,7 @@
Diffusive Hillslope Evolution (FTCS)
sim_qm_of_esp
QgsProcessingParameterRasterLayer|DEM|Elevation|None|False
ParameterBoolean|UPDATE|Update|True
QgsProcessingParameterBoolean|UPDATE|Update|True
QgsProcessingParameterNumber|KAPPA|Diffusivity [m2/kyr]|QgsProcessingParameterNumber.Double|1.0|False|0.0|None
QgsProcessingParameterNumber|DURATION|Simulation Time [kyr]|QgsProcessingParameterNumber.Double|100.0|False|0.0|None
ParameterSelection|TIMESTEP|Time Step|[0] user defined;[1] automatically|1
@@ -7,7 +7,7 @@ QgsProcessingParameterNumber|TOLERANCE|Tolerance [Degree]|QgsProcessingParameter
QgsProcessingParameterNumber|MAXDISTANCE|Maximum Distance [Cells]|QgsProcessingParameterNumber.Integer|0|False|None|None
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
QgsProcessingParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|QgsProcessingParameterNumber.Integer|1|False|None|None
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
QgsProcessingParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
QgsProcessingParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|QgsProcessingParameterNumber.Double|1.0|False|None|None
QgsProcessingParameterRasterDestination|MEAN|Arithmetic Mean
QgsProcessingParameterRasterDestination|DIFMEAN|Difference from Arithmetic Mean
@@ -6,7 +6,7 @@ QgsProcessingParameterNumber|SEARCH_RADIUS|Search Radius Distance|QgsProcessingP
ParameterSelection|NB_CASE|Connectivity Neighbourhood|[0] Rook's case;[1] Queen's case|1
ParameterSelection|DW_WEIGHTING|Weighting Function|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
QgsProcessingParameterNumber|DW_IDW_POWER|Inverse Distance Weighting Power|QgsProcessingParameterNumber.Integer|1|False|0.0|None
ParameterBoolean|DW_IDW_OFFSET|Inverse Distance Offset|True
QgsProcessingParameterBoolean|DW_IDW_OFFSET|Inverse Distance Offset|True
QgsProcessingParameterNumber|DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|QgsProcessingParameterNumber.Double|0.7|False|0.0|None
QgsProcessingParameterRasterDestination|COUNT|Number of Categories
QgsProcessingParameterRasterDestination|DIVERSITY|Diversity
@@ -4,10 +4,10 @@ QgsProcessingParameterRasterLayer|DEM|Elevation|None|False
QgsProcessingParameterRasterLayer|DIR|Wind Direction|None|True
QgsProcessingParameterRasterLayer|LEN|Wind Speed|None|True
QgsProcessingParameterNumber|DIR_CONST|Constant Wind Direction [Degree]|QgsProcessingParameterNumber.Integer|135|False|None|None
ParameterBoolean|OLDVER |Old Version|True
QgsProcessingParameterBoolean|OLDVER |Old Version|True
QgsProcessingParameterNumber|MAXDIST|Search Distance [km]|QgsProcessingParameterNumber.Integer|300|False|0.0|None
QgsProcessingParameterNumber|ACCEL|Acceleration|QgsProcessingParameterNumber.Double|1.5|False|None|None
ParameterBoolean|PYRAMIDS |Use Pyramids with New Version|True
QgsProcessingParameterBoolean|PYRAMIDS |Use Pyramids with New Version|True
QgsProcessingParameterNumber|LEEFACT|Lee Factor|QgsProcessingParameterNumber.Double|0.5|False|None|None
QgsProcessingParameterNumber|LUVFACT|Luv Factor|QgsProcessingParameterNumber.Double|1.0|False|None|None
ParameterSelection|DIR_UNITS|Wind Direction Units|[0] radians;[1] degree
@@ -10,7 +10,7 @@ QgsProcessingParameterRasterLayer|ACCU_TARGET|Accumulation Target|None|True
QgsProcessingParameterNumber|STEP|Step|QgsProcessingParameterNumber.Integer|1|False|None|None
ParameterSelection|METHOD|Method|[0] Rho 8;[1] Kinematic Routing Algorithm;[2] DEMON
QgsProcessingParameterNumber|MINDQV|DEMON - Min. DQV|QgsProcessingParameterNumber.Double|0.0|False|None|None
ParameterBoolean|CORRECT|Flow Correction|False
QgsProcessingParameterBoolean|CORRECT|Flow Correction|False
QgsProcessingParameterRasterDestination|FLOW|Flow Accumulation
QgsProcessingParameterRasterDestination|VAL_MEAN|Mean over Catchment
QgsProcessingParameterRasterDestination|ACCU_TOTAL|Accumulated Material

0 comments on commit ca0b7a2

Please sign in to comment.