Skip to content

Commit d9ac377

Browse files
nyalldawsonalexbruy
authored andcommitted
Update SAGA ParameterTable parameters
1 parent 4ac6847 commit d9ac377

File tree

158 files changed

+256
-268
lines changed

Some content is hidden

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

158 files changed

+256
-268
lines changed

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
from processing.core.ProcessingConfig import ProcessingConfig
4040
from processing.core.parameters import (getParameterFromString,
4141
ParameterExtent,
42-
ParameterTable,
4342
ParameterMultipleInput,
4443
ParameterFixedTable)
4544
from processing.core.outputs import (getOutputFromString,
@@ -163,16 +162,6 @@ def processAlgorithm(self, parameters, context, feedback):
163162
else:
164163
raise QgsProcessingException(
165164
self.tr('Unsupported file format'))
166-
elif isinstance(param, ParameterTable):
167-
if param.name() not in parameters or parameters[param.name()] is None:
168-
continue
169-
table = QgsProcessingUtils.mapLayerFromString(parameters[param.name()], context, False)
170-
if table:
171-
filename = dataobjects.exportTable(table)
172-
self.exportedLayers[parameters[param.name()]] = filename
173-
elif not parameters[param.name()].endswith('shp'):
174-
raise QgsProcessingException(
175-
self.tr('Unsupported file format'))
176165
elif isinstance(param, ParameterMultipleInput):
177166
if param.name() not in parameters or parameters[param.name()] is None:
178167
continue
@@ -213,7 +202,7 @@ def processAlgorithm(self, parameters, context, feedback):
213202
for param in self.parameterDefinitions():
214203
if not param.name() in parameters or parameters[param.name()] is None:
215204
continue
216-
if isinstance(param, (QgsProcessingParameterRasterLayer, QgsProcessingParameterFeatureSource, ParameterTable)):
205+
if isinstance(param, (QgsProcessingParameterRasterLayer, QgsProcessingParameterFeatureSource)):
217206
value = parameters[param.name()]
218207
if value in list(self.exportedLayers.keys()):
219208
command += ' -' + param.name() + ' "' \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Add Coordinates to points
22
shapes_points
33
QgsProcessingParameterFeatureSource|INPUT|Points|0|None|False
4-
OutputVector|OUTPUT|Points with coordinates
4+
QgsProcessingParameterVectorDestination|OUTPUT|Points with coordinates

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ shapes_grid
33
QgsProcessingParameterFeatureSource|SHAPES|Points|0|None|False
44
ParameterMultipleInput|GRIDS|Grids|3|False
55
QgsProcessingParameterEnum|INTERPOL|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation
6-
OutputVector|RESULT|Result
6+
QgsProcessingParameterVectorDestination|RESULT|Result
77
AllowUnmatching

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ shapes_grid
33
QgsProcessingParameterFeatureSource|SHAPES|Shapes|-1|None|False
44
ParameterMultipleInput|GRIDS|Grids|3|False
55
QgsProcessingParameterEnum|INTERPOL|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation
6-
OutputVector|RESULT|Result
6+
QgsProcessingParameterVectorDestination|RESULT|Result
77
AllowUnmatching
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Add Indicator Fields for Categories
22
table_tools
3-
ParameterTable|TABLE|Table|False
4-
ParameterTable|FIELD|Categories|False
5-
ParameterTable|OUT_TABLE|Output table with field(s) deleted|True
6-
OutputVector|OUT_SHAPES|Output shapes with field(s) deleted
3+
QgsProcessingParameterFeatureSource|TABLE|Table|5|None|False
4+
QgsProcessingParameterFeatureSource|FIELD|Categories|5|None|False
5+
QgsProcessingParameterFeatureSource|OUT_TABLE|Output table with field(s) deleted|5|None|True
6+
QgsProcessingParameterVectorDestination|OUT_SHAPES|Output shapes with field(s) deleted

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ QgsProcessingParameterFeatureSource|INPUT|Polygons|2|None|False
44
QgsProcessingParameterFeatureSource|POINTS|Points|0|None|False
55
ParameterTableField|FIELDS|Attributes|POINTS|-1|False
66
QgsProcessingParameterBoolean|ADD_LOCATION_INFO|Add location info|False
7-
OutputVector|OUTPUT|Result
7+
QgsProcessingParameterVectorDestination|OUTPUT|Result

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ shapes_points
33
QgsProcessingParameterFeatureSource|INPUT|Points|0|None|False
44
QgsProcessingParameterFeatureSource|POLYGONS|Polygons|2|None|False
55
ParameterTableField|FIELDS|Attribute|POLYGONS|-1|False
6-
OutputVector|OUTPUT|Result
6+
QgsProcessingParameterVectorDestination|OUTPUT|Result

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Aggregate Point Observations
22
shapes_points
33
QgsProcessingParameterFeatureSource|REFERENCE|Reference Points|-1|None|False
44
ParameterTableField|REFERENCE_ID|ID|REFERENCE|-1|False
5-
ParameterTable|OBSERVATIONS|Observations|False
5+
QgsProcessingParameterFeatureSource|OBSERVATIONS|Observations|5|None|False
66
ParameterTableField|X|X|OBSERVATIONS|-1|False
77
ParameterTableField|Y|Y|OBSERVATIONS|-1|False
88
ParameterTableField|TRACK|Track|OBSERVATIONS|-1|False
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Analytical Hierarchy Process
22
grid_analysis
33
ParameterMultipleInput|GRIDS|Input Grids|3|False
4-
ParameterTable|TABLE|Pairwise Comparisons Table|False
4+
QgsProcessingParameterFeatureSource|TABLE|Pairwise Comparisons Table|5|None|False
55
QgsProcessingParameterRasterDestination|OUTPUT|Output Grid

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Angular Distance Weighted
22
grid_gridding
33
QgsProcessingParameterFeatureSource|SHAPES|Points|-1|None|False
4-
ParameterTable|FIELD|Attribute|False
4+
QgsProcessingParameterFeatureSource|FIELD|Attribute|5|None|False
55
QgsProcessingParameterEnum|TARGET_DEFINITION|Target Grid System|[0] user defined;[1] grid or grid system|False|0
66
QgsProcessingParameterNumber|TARGET_USER_SIZE|Cellsize|QgsProcessingParameterNumber.Double|1.000000|False| 0.000000|None
77
QgsProcessingParameterNumber|TARGET_USER_XMIN|Left|QgsProcessingParameterNumber.Double|0.000000|False|None|None

0 commit comments

Comments
 (0)