Skip to content

Commit c7961b1

Browse files
committed
[processing] fixed management of SAGA versions
fixes #13429
1 parent 91e1554 commit c7961b1

469 files changed

Lines changed: 4226 additions & 5 deletions

File tree

Some content is hidden

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

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class SagaAlgorithmProvider(AlgorithmProvider):
4545

4646
supportedVersions = {"2.1.2": ("2.1.2", SagaAlgorithm212),
4747
"2.1.3": ("2.1.3", SagaAlgorithm213),
48-
"2.1.4": ("2.1.3", SagaAlgorithm214),
49-
# to allow testing upcoming release
50-
"2.2.0": ("2.1.3", SagaAlgorithm214)}
48+
"2.1.4": ("2.1.4", SagaAlgorithm214),
49+
"2.2.0": ("2.2.0", SagaAlgorithm214)}
50+
5151

5252
def __init__(self):
5353
AlgorithmProvider.__init__(self)
@@ -87,9 +87,12 @@ def _loadAlgorithms(self):
8787
self.tr('Problem with SAGA installation: SAGA was not found or is not correctly installed'))
8888
return
8989
if version not in self.supportedVersions:
90-
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
90+
if version > self.supportedVersions.keys()[-1]:
91+
version = self.supportedVersions.keys()[-1]
92+
else:
93+
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
9194
self.tr('Problem with SAGA installation: installed SAGA version (%s) is not supported' % version))
92-
return
95+
return
9396

9497
folder = SagaUtils.sagaDescriptionPath()
9598
folder = os.path.join(folder, self.supportedVersions[version][0])
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Accumulated Cost (Anisotropic)
2+
grid_analysis
3+
ParameterRaster|COST|Cost Grid|False
4+
ParameterRaster|DIRECTION|Direction of max cost|False
5+
ParameterRaster|POINTS|Destination Points|False
6+
ParameterNumber|K|k factor|None|None|1
7+
ParameterNumber|THRESHOLD|Threshold for different route|None|None|0
8+
OutputRaster|ACCCOST|Accumulated Cost
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Accumulated Cost (Isotropic)
2+
grid_analysis
3+
ParameterRaster|COST|Cost Grid|False
4+
ParameterRaster|POINTS|Destination Points|False
5+
ParameterNumber|THRESHOLD|Threshold for different route|None|None|0.0
6+
OutputRaster|ACCCOST|Accumulated Cost
7+
OutputRaster|CLOSESTPT|Closest Point
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Add Coordinates to points
2+
shapes_points
3+
ParameterVector|INPUT|Points|0|False
4+
OutputVector|OUTPUT|Points with coordinates
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Add Grid Values to Points
2+
shapes_grid
3+
ParameterVector|SHAPES|Points|0|False
4+
ParameterMultipleInput|GRIDS|Grids|3|False
5+
ParameterSelection|INTERPOL|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation
6+
OutputVector|RESULT|Result
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Add Grid Values to Shapes
2+
shapes_grid
3+
ParameterVector|SHAPES|Shapes|-1|False
4+
ParameterMultipleInput|GRIDS|Grids|3|False
5+
ParameterSelection|INTERPOL|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation
6+
OutputVector|RESULT|Result
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Add Polygon Attributes to Points
2+
shapes_points
3+
ParameterVector|INPUT|Points|0|False
4+
ParameterVector|POLYGONS|Polygons|2|False
5+
ParameterTableField|FIELDS|Attribute|POLYGONS|-1|False
6+
OutputVector|OUTPUT|Result
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Aggregate
2+
grid_tools
3+
ParameterRaster|INPUT|Grid|False
4+
ParameterNumber|SIZE|Aggregation Size|None|None|3
5+
ParameterSelection|METHOD|Method|[0] Sum;[1] Min;[2] Max
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Aggregate Point Observations
2+
shapes_points
3+
ParameterVector|REFERENCE|Reference Points|-1|False
4+
ParameterTableField|REFERENCE_ID|ID|REFERENCE|-1|False
5+
ParameterTable|OBSERVATIONS|Observations|False
6+
ParameterTableField|X|X|OBSERVATIONS|-1|False
7+
ParameterTableField|Y|Y|OBSERVATIONS|-1|False
8+
ParameterTableField|TRACK|Track|OBSERVATIONS|-1|False
9+
ParameterTableField|DATE|Date|OBSERVATIONS|-1|False
10+
ParameterTableField|TIME|Time|OBSERVATIONS|-1|False
11+
ParameterTableField|PARAMETER|Parameter|OBSERVATIONS|-1|False
12+
ParameterNumber|EPS_TIME|Maximum Time Span (Seconds)|None|None|60.0
13+
ParameterNumber|EPS_SPACE|Maximum Distance|None|None|0.002
14+
OutputTable|AGGREGATED|Aggregated
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Aggregation Index
2+
grid_analysis
3+
ParameterRaster|INPUT|Input Grid|False
4+
ParameterNumber|MAXNUMCLASS|Max. Number of Classes|None|None|5
5+
OutputTable|RESULT|Result

0 commit comments

Comments
 (0)