Skip to content
Permalink
Browse files
Update SAGA ParameterTable parameters
  • Loading branch information
nyalldawson authored and alexbruy committed Nov 9, 2017
1 parent 4ac6847 commit d9ac3772fdfa1079a234572715ea5470763b8c39
Show file tree
Hide file tree
Showing 158 changed files with 256 additions and 268 deletions.
@@ -39,7 +39,6 @@
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.parameters import (getParameterFromString,
ParameterExtent,
ParameterTable,
ParameterMultipleInput,
ParameterFixedTable)
from processing.core.outputs import (getOutputFromString,
@@ -163,16 +162,6 @@ def processAlgorithm(self, parameters, context, feedback):
else:
raise QgsProcessingException(
self.tr('Unsupported file format'))
elif isinstance(param, ParameterTable):
if param.name() not in parameters or parameters[param.name()] is None:
continue
table = QgsProcessingUtils.mapLayerFromString(parameters[param.name()], context, False)
if table:
filename = dataobjects.exportTable(table)
self.exportedLayers[parameters[param.name()]] = filename
elif not parameters[param.name()].endswith('shp'):
raise QgsProcessingException(
self.tr('Unsupported file format'))
elif isinstance(param, ParameterMultipleInput):
if param.name() not in parameters or parameters[param.name()] is None:
continue
@@ -213,7 +202,7 @@ def processAlgorithm(self, parameters, context, feedback):
for param in self.parameterDefinitions():
if not param.name() in parameters or parameters[param.name()] is None:
continue
if isinstance(param, (QgsProcessingParameterRasterLayer, QgsProcessingParameterFeatureSource, ParameterTable)):
if isinstance(param, (QgsProcessingParameterRasterLayer, QgsProcessingParameterFeatureSource)):
value = parameters[param.name()]
if value in list(self.exportedLayers.keys()):
command += ' -' + param.name() + ' "' \
@@ -1,4 +1,4 @@
Add Coordinates to points
shapes_points
QgsProcessingParameterFeatureSource|INPUT|Points|0|None|False
OutputVector|OUTPUT|Points with coordinates
QgsProcessingParameterVectorDestination|OUTPUT|Points with coordinates
@@ -3,5 +3,5 @@ shapes_grid
QgsProcessingParameterFeatureSource|SHAPES|Points|0|None|False
ParameterMultipleInput|GRIDS|Grids|3|False
QgsProcessingParameterEnum|INTERPOL|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation
OutputVector|RESULT|Result
QgsProcessingParameterVectorDestination|RESULT|Result
AllowUnmatching
@@ -3,5 +3,5 @@ shapes_grid
QgsProcessingParameterFeatureSource|SHAPES|Shapes|-1|None|False
ParameterMultipleInput|GRIDS|Grids|3|False
QgsProcessingParameterEnum|INTERPOL|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation
OutputVector|RESULT|Result
QgsProcessingParameterVectorDestination|RESULT|Result
AllowUnmatching
@@ -1,6 +1,6 @@
Add Indicator Fields for Categories
table_tools
ParameterTable|TABLE|Table|False
ParameterTable|FIELD|Categories|False
ParameterTable|OUT_TABLE|Output table with field(s) deleted|True
OutputVector|OUT_SHAPES|Output shapes with field(s) deleted
QgsProcessingParameterFeatureSource|TABLE|Table|5|None|False
QgsProcessingParameterFeatureSource|FIELD|Categories|5|None|False
QgsProcessingParameterFeatureSource|OUT_TABLE|Output table with field(s) deleted|5|None|True
QgsProcessingParameterVectorDestination|OUT_SHAPES|Output shapes with field(s) deleted
@@ -4,4 +4,4 @@ QgsProcessingParameterFeatureSource|INPUT|Polygons|2|None|False
QgsProcessingParameterFeatureSource|POINTS|Points|0|None|False
ParameterTableField|FIELDS|Attributes|POINTS|-1|False
QgsProcessingParameterBoolean|ADD_LOCATION_INFO|Add location info|False
OutputVector|OUTPUT|Result
QgsProcessingParameterVectorDestination|OUTPUT|Result
@@ -3,4 +3,4 @@ shapes_points
QgsProcessingParameterFeatureSource|INPUT|Points|0|None|False
QgsProcessingParameterFeatureSource|POLYGONS|Polygons|2|None|False
ParameterTableField|FIELDS|Attribute|POLYGONS|-1|False
OutputVector|OUTPUT|Result
QgsProcessingParameterVectorDestination|OUTPUT|Result
@@ -2,7 +2,7 @@ Aggregate Point Observations
shapes_points
QgsProcessingParameterFeatureSource|REFERENCE|Reference Points|-1|None|False
ParameterTableField|REFERENCE_ID|ID|REFERENCE|-1|False
ParameterTable|OBSERVATIONS|Observations|False
QgsProcessingParameterFeatureSource|OBSERVATIONS|Observations|5|None|False
ParameterTableField|X|X|OBSERVATIONS|-1|False
ParameterTableField|Y|Y|OBSERVATIONS|-1|False
ParameterTableField|TRACK|Track|OBSERVATIONS|-1|False
@@ -1,5 +1,5 @@
Analytical Hierarchy Process
grid_analysis
ParameterMultipleInput|GRIDS|Input Grids|3|False
ParameterTable|TABLE|Pairwise Comparisons Table|False
QgsProcessingParameterFeatureSource|TABLE|Pairwise Comparisons Table|5|None|False
QgsProcessingParameterRasterDestination|OUTPUT|Output Grid
@@ -1,7 +1,7 @@
Angular Distance Weighted
grid_gridding
QgsProcessingParameterFeatureSource|SHAPES|Points|-1|None|False
ParameterTable|FIELD|Attribute|False
QgsProcessingParameterFeatureSource|FIELD|Attribute|5|None|False
QgsProcessingParameterEnum|TARGET_DEFINITION|Target Grid System|[0] user defined;[1] grid or grid system|False|0
QgsProcessingParameterNumber|TARGET_USER_SIZE|Cellsize|QgsProcessingParameterNumber.Double|1.000000|False| 0.000000|None
QgsProcessingParameterNumber|TARGET_USER_XMIN|Left|QgsProcessingParameterNumber.Double|0.000000|False|None|None
@@ -3,7 +3,7 @@ imagery_opencv
ParameterMultipleInput|FEATURES|Features|3|False
QgsProcessingParameterBoolean|NORMALIZE|Normalize|False
QgsProcessingParameterFeatureSource|TRAIN_AREAS|Training Areas|2|None|False
ParameterTable|TRAIN_CLASS|Class Identifier|False
QgsProcessingParameterFeatureSource|TRAIN_CLASS|Class Identifier|5|None|False
QgsProcessingParameterRasterDestination|CLASSES|Classification
QgsProcessingParameterNumber|ANN_LAYERS|Number of Layers|QgsProcessingParameterNumber.Integer|3|False|1|None
QgsProcessingParameterNumber|ANN_NEURONS|Number of Neurons|QgsProcessingParameterNumber.Integer|3|False|1|None
@@ -3,4 +3,4 @@ grid_visualisation
QgsProcessingParameterRasterLayer|ASPECT|Aspect|None|False
QgsProcessingParameterRasterLayer|SLOPE|Slope|None|False
QgsProcessingParameterRasterDestination|ASPECT_SLOPE|Aspect-Slope
ParameterTable|LUT|Lookup Table|True
QgsProcessingParameterFeatureSource|LUT|Lookup Table|5|None|True
@@ -11,8 +11,8 @@ QgsProcessingParameterRasterDestination|SINKS|Closed Depressions
QgsProcessingParameterRasterDestination|FLOW|Total Catchment Area
QgsProcessingParameterRasterDestination|WETNESS|Topographic Wetness Index
QgsProcessingParameterRasterDestination|LSFACTOR|LS-Factor
OutputVector|CHANNELS|Channel Network
OutputVector|BASINS|Drainage Basins
QgsProcessingParameterVectorDestination|CHANNELS|Channel Network
QgsProcessingParameterVectorDestination|BASINS|Drainage Basins
QgsProcessingParameterRasterDestination|CHNL_BASE|Channel Network Base Level
QgsProcessingParameterRasterDestination|CHNL_DIST|Channel Network Distance
QgsProcessingParameterRasterDestination|VALL_DEPTH|Valley Depth
@@ -3,7 +3,7 @@ imagery_opencv
ParameterMultipleInput|FEATURES|Features|3|False
QgsProcessingParameterBoolean|NORMALIZE|Normalize|False
QgsProcessingParameterFeatureSource|TRAIN_AREAS|Training Areas|-1|None|False
ParameterTable|TRAIN_CLASS|Class Identifier|False
QgsProcessingParameterFeatureSource|TRAIN_CLASS|Class Identifier|5|None|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
@@ -1,6 +1,6 @@
Change Date Format
table_tools
ParameterTable|TABLE|Table|False
QgsProcessingParameterFeatureSource|TABLE|Table|5|None|False
ParameterTableField|FIELD|Date Field|TABLE|-1|False
QgsProcessingParameterEnum|FMT_IN|Input Format|[0] dd.mm.yy;[1] yy.mm.dd;[2] dd:mm:yy;[3] yy:mm:dd;[4] ddmmyyyy, fix size;[5] yyyymmdd, fix size;[6] ddmmyy, fix size;[7] yymmdd, fix size;[8] Julian Day
QgsProcessingParameterEnum|FMT_OUT|Output Format|[0] dd.mm.yy;[1] yy.mm.dd;[2] dd:mm:yy;[3] yy:mm:dd;[4] ddmmyyyy, fix size;[5] yyyymmdd, fix size;[6] ddmmyy, fix size;[7] yymmdd, fix size;[8] Julian Day
@@ -1,12 +1,12 @@
Change Detection
imagery_classification
QgsProcessingParameterRasterLayer|INITIAL|Initial State|None|False
ParameterTable|INI_LUT|Look-up Table|True
QgsProcessingParameterFeatureSource|INI_LUT|Look-up Table|5|None|True
ParameterTableField|INI_LUT_MIN|Value|INI_LUT|-1|False
ParameterTableField|INI_LUT_MAX|Value (Maximum)|INI_LUT|-1|False
ParameterTableField|INI_LUT_NAM|Name|INI_LUT|-1|False
QgsProcessingParameterRasterLayer|FINAL|Final State|None|False
ParameterTable|FIN_LUT|Look-up Table|True
QgsProcessingParameterFeatureSource|FIN_LUT|Look-up Table|5|None|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
@@ -1,6 +1,6 @@
Change Time Format
table_tools
ParameterTable|TABLE|Table|False
QgsProcessingParameterFeatureSource|TABLE|Table|5|None|False
ParameterTableField|FIELD|Time Field|TABLE|-1|False
QgsProcessingParameterEnum|FMT_IN|Input Format|[0] hh.mm.ss;[1] hh:mm:ss;[2] hhmmss, fix size;[3] hours;[4] minutes;[5] seconds
QgsProcessingParameterEnum|FMT_OUT|Output Format|[0] hh.mm.ss;[1] hh:mm:ss;[2] hhmmss, fix size;[3] hours;[4] minutes;[5] seconds
@@ -11,4 +11,4 @@ QgsProcessingParameterRasterLayer|TRACE_WEIGHT|Tracing: Weight|None|True
QgsProcessingParameterNumber|MINLEN|Min. Segment Length|QgsProcessingParameterNumber.Integer|10|False|0.0|None
QgsProcessingParameterRasterDestination|CHNLNTWRK|Channel Network
QgsProcessingParameterRasterDestination|CHNLROUTE|Channel Direction
OutputVector|SHAPES|Channel Network
QgsProcessingParameterVectorDestination|SHAPES|Channel Network
@@ -6,6 +6,6 @@ QgsProcessingParameterRasterDestination|DIRECTION|Flow Direction
QgsProcessingParameterRasterDestination|CONNECTION|Flow Connectivity
QgsProcessingParameterRasterDestination|ORDER|Strahler Order
QgsProcessingParameterRasterDestination|BASIN|Drainage Basins
OutputVector|SEGMENTS|Channels
OutputVector|BASINS|Drainage Basins
OutputVector|NODES|Junctions
QgsProcessingParameterVectorDestination|SEGMENTS|Channels
QgsProcessingParameterVectorDestination|BASINS|Drainage Basins
QgsProcessingParameterVectorDestination|NODES|Junctions
@@ -4,4 +4,4 @@ QgsProcessingParameterFeatureSource|POINTS|Points|0|None|False
QgsProcessingParameterFeatureSource|POLYGONS|Polygons|2|None|False
ParameterTableField|FIELD|Add Attribute to Clipped Points|POLYGONS|-1|False
QgsProcessingParameterEnum|METHOD|Clipping Options|[0] one layer for all points;[1] separate layer for each polygon
OutputVector|CLIPS|Clipped Points
QgsProcessingParameterVectorDestination|CLIPS|Clipped Points
@@ -1,10 +1,10 @@
Cluster Analysis (Shapes)
table_calculus
QgsProcessingParameterFeatureSource|INPUT|Shapes|-1|None|False
OutputVector|RESULT|Result
ParameterTable|FIELDS|Attributes|False
ParameterTable|CLUSTER|Cluster|False
ParameterTable|STATISTICS|Statistics|False
QgsProcessingParameterVectorDestination|RESULT|Result
QgsProcessingParameterFeatureSource|FIELDS|Attributes|5|None|False
QgsProcessingParameterFeatureSource|CLUSTER|Cluster|5|None|False
QgsProcessingParameterFeatureSource|STATISTICS|Statistics|5|None|False
QgsProcessingParameterEnum|METHOD|Method|[0] Iterative Minimum Distance (Forgy 1965);[1] Hill-Climbing (Rubin 1967);[2] Combined Minimum Distance / Hillclimbing|False|1
QgsProcessingParameterNumber|NCLUSTER|Clusters|QgsProcessingParameterNumber.Integer|10|False| 2|None
QgsProcessingParameterBoolean|NORMALISE|Normalise|False
@@ -1,10 +1,10 @@
Cluster Analysis
table_calculus
ParameterTable|INPUT|Table|False
ParameterTable|RESULT|Result|True
ParameterTable|FIELDS|Attributes|False
ParameterTable|CLUSTER|Cluster|False
ParameterTable|STATISTICS|Statistics|False
QgsProcessingParameterFeatureSource|INPUT|Table|5|None|False
QgsProcessingParameterFeatureSource|RESULT|Result|5|None|True
QgsProcessingParameterFeatureSource|FIELDS|Attributes|5|None|False
QgsProcessingParameterFeatureSource|CLUSTER|Cluster|5|None|False
QgsProcessingParameterFeatureSource|STATISTICS|Statistics|5|None|False
QgsProcessingParameterEnum|METHOD|Method|[0] Iterative Minimum Distance (Forgy 1965);[1] Hill-Climbing (Rubin 1967);[2] Combined Minimum Distance / Hillclimbing|False|1
QgsProcessingParameterNumber|NCLUSTER|Clusters|QgsProcessingParameterNumber.Integer|10|False| 2|None
QgsProcessingParameterBoolean|NORMALISE|Normalise|False
@@ -1,7 +1,7 @@
Confusion Matrix (Polygons / Grid)
imagery_classification
QgsProcessingParameterRasterLayer|GRID|Classification|None|False
ParameterTable|GRID_LUT|Look-up Table|True
QgsProcessingParameterFeatureSource|GRID_LUT|Look-up Table|5|None|True
ParameterTableField|GRID_LUT_MIN|Value|GRID_LUT|-1|True
ParameterTableField|GRID_LUT_MAX|Value (Maximum)|GRID_LUT|-1|True
ParameterTableField|GRID_LUT_NAM|Name|GRID_LUT|-1|True
@@ -1,12 +1,12 @@
Confusion Matrix (Polygons / Grid)
imagery_classification
QgsProcessingParameterRasterLayer|GRID|Classification|None|False
ParameterTable|GRID_LUT|Look-up Table|True
ParameterTable|GRID_LUT_MIN|Value|False
ParameterTable|GRID_LUT_MAX|Value (Maximum)|False
ParameterTable|GRID_LUT_NAM|Name|False
QgsProcessingParameterFeatureSource|GRID_LUT|Look-up Table|5|None|True
QgsProcessingParameterFeatureSource|GRID_LUT_MIN|Value|5|None|False
QgsProcessingParameterFeatureSource|GRID_LUT_MAX|Value (Maximum)|5|None|False
QgsProcessingParameterFeatureSource|GRID_LUT_NAM|Name|5|None|False
QgsProcessingParameterFeatureSource|POLYGONS|Polygons|-1|None|False
ParameterTable|FIELD|Classes|False
ParameterTable|CONFUSION|Confusion Matrix|False
ParameterTable|CLASSES|Class Values|False
ParameterTable|SUMMARY|Summary|False
QgsProcessingParameterFeatureSource|FIELD|Classes|5|None|False
QgsProcessingParameterFeatureSource|CONFUSION|Confusion Matrix|5|None|False
QgsProcessingParameterFeatureSource|CLASSES|Class Values|5|None|False
QgsProcessingParameterFeatureSource|SUMMARY|Summary|5|None|False
@@ -1,18 +1,18 @@
Confusion Matrix (Two Grids)
imagery_classification
QgsProcessingParameterRasterLayer|ONE|Classification 1|None|False
ParameterTable|ONE_LUT|Look-up Table|True
ParameterTable|ONE_LUT_MIN|Value|False
ParameterTable|ONE_LUT_MAX|Value (Maximum)|False
ParameterTable|ONE_LUT_NAM|Name|False
QgsProcessingParameterFeatureSource|ONE_LUT|Look-up Table|5|None|True
QgsProcessingParameterFeatureSource|ONE_LUT_MIN|Value|5|None|False
QgsProcessingParameterFeatureSource|ONE_LUT_MAX|Value (Maximum)|5|None|False
QgsProcessingParameterFeatureSource|ONE_LUT_NAM|Name|5|None|False
QgsProcessingParameterRasterLayer|TWO|Classification 2|None|False
ParameterTable|TWO_LUT|Look-up Table|True
ParameterTable|TWO_LUT_MIN|Value|False
ParameterTable|TWO_LUT_MAX|Value (Maximum)|False
ParameterTable|TWO_LUT_NAM|Name|False
QgsProcessingParameterFeatureSource|TWO_LUT|Look-up Table|5|None|True
QgsProcessingParameterFeatureSource|TWO_LUT_MIN|Value|5|None|False
QgsProcessingParameterFeatureSource|TWO_LUT_MAX|Value (Maximum)|5|None|False
QgsProcessingParameterFeatureSource|TWO_LUT_NAM|Name|5|None|False
QgsProcessingParameterRasterDestination|COMBINED|Combined Classes
QgsProcessingParameterBoolean|NOCHANGE|Report Unchanged Classes|True
ParameterTable|CONFUSION|Confusion Matrix|False
QgsProcessingParameterFeatureSource|CONFUSION|Confusion Matrix|5|None|False
QgsProcessingParameterEnum|OUTPUT|Output as...|[0] cells;[1] percent;[2] area|False|0
ParameterTable|CLASSES|Class Values|False
ParameterTable|SUMMARY|Summary|False
QgsProcessingParameterFeatureSource|CLASSES|Class Values|5|None|False
QgsProcessingParameterFeatureSource|SUMMARY|Summary|5|None|False
@@ -5,6 +5,6 @@ QgsProcessingParameterRasterDestination|FILTERED_MASK|Filtered Image
QgsProcessingParameterBoolean|FILTER|Apply Filter?|True
QgsProcessingParameterNumber|SIZE|Filter Size (Radius)|QgsProcessingParameterNumber.Integer|3|False|None|None
QgsProcessingParameterRasterDestination|SYMBOLIC_IMAGE|Symbolic Image
OutputVector|OUTLINES|Outlines
QgsProcessingParameterVectorDestination|OUTLINES|Outlines
QgsProcessingParameterBoolean|BORDER_PIXEL_CENTERS|Pixel Centers?|False
QgsProcessingParameterBoolean|REMOVE_MARGINAL_REGIONS|Remove Border Regions?|False