Skip to content

Commit 87e3387

Browse files
committedJul 18, 2013
[sextante] adapted SAGA binding to support different versions in windows and linux
1 parent bd3bb64 commit 87e3387

11 files changed

+15
-1
lines changed
 

‎python/plugins/sextante/saga/SagaAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def processAlgorithm(self, progress):
304304
if SextanteUtils.isWindows() or SextanteUtils.isMac():
305305
commands.append("io_gdal 1 -GRIDS \"" + filename2 + "\" -FORMAT 4 -TYPE 0 -FILE \"" + filename + "\"");
306306
else:
307-
commands.append("libio_gdal 1 -GRIDS \"" + filename2 + "\" -FORMAT 4 -TYPE 0 -FILE \"" + filename + "\"");
307+
commands.append("libio_gdal 1 -GRIDS \"" + filename2 + "\" -FORMAT 1 -TYPE 0 -FILE \"" + filename + "\"");
308308

309309

310310
#4 Run SAGA

‎python/plugins/sextante/saga/SagaAlgorithmProvider.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ def createAlgsList(self):
7373
folder = SagaUtils.sagaDescriptionPath()
7474
for descriptionFile in os.listdir(folder):
7575
if descriptionFile.endswith("txt"):
76+
if SextanteUtils.isWindows() or SextanteUtils.isMac():
77+
if descriptionFile.startswith("2.0.8"):
78+
continue
79+
else:
80+
if descriptionFile.startswith("2.1"):
81+
continue
7682
try:
7783
alg = SagaAlgorithm(os.path.join(folder, descriptionFile))
7884
if alg.name.strip() != "":
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Polygon Dissolve
2+
shapes_polygons
3+
ParameterVector|POLYGONS|Polygons|2|False
4+
ParameterTableField|FIELD_1|1. Attribute|POLYGONS|-1|True
5+
ParameterTableField|FIELD_2|2. Attribute|POLYGONS|-1|True
6+
ParameterTableField|FIELD_3|3. Attribute|POLYGONS|-1|True
7+
ParameterSelection|DISSOLVE|Dissolve...|[0] polygons with same attribute value;[1] all polygons;[2] polygons with same attribute value (keep inner boundaries);[3] all polygons (keep inner boundaries)
8+
OutputVector|DISSOLVED|Dissolved Polygons

0 commit comments

Comments
 (0)