Skip to content

Commit afb6bd3

Browse files
committed
[sextante] minor fixes and algorithm changes
1 parent 0667b94 commit afb6bd3

File tree

6 files changed

+21
-10
lines changed

6 files changed

+21
-10
lines changed

python/plugins/sextante/grass/description/v.clean.advanced.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ v.clean.advanced - Toolset for cleaning topology of vector map (Advanced).
33
Vector (v.*)
44
ParameterVector|input|Layer to clean|-1|False
55
ParameterString|tool|Cleaning tools (comma separated)|break
6-
ParameterNumber|thresh|Threshold|None|None|0..1
6+
ParameterNumber|thresh|Threshold|None|None|0.0001
77
OutputVector|output|Cleaned vector layer
88
OutputVector|error|Errors layer

python/plugins/sextante/gui/AlgorithmExecutionDialog.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ def __init__(self, alg, mainWidget):
7070
self.buttonBox = QtGui.QDialogButtonBox()
7171
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
7272
self.buttonBox.setStandardButtons(
73-
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.Ok)
73+
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Close)
7474
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)
75-
75+
self.runButton = QtGui.QPushButton()
76+
self.runButton.setText("Run")
77+
self.buttonBox.addButton(self.runButton, QtGui.QDialogButtonBox.ActionRole)
78+
self.runButton.clicked.connect(self.accept)
7679
self.scrollArea = QtGui.QScrollArea()
7780
if self.mainWidget:
7881
self.scrollArea.setWidget(self.mainWidget)
@@ -118,7 +121,7 @@ def __init__(self, alg, mainWidget):
118121
self.verticalLayout.addWidget(self.progress)
119122
self.verticalLayout.addWidget(self.buttonBox)
120123
self.setLayout(self.verticalLayout)
121-
self.buttonBox.accepted.connect(self.accept)
124+
#self.buttonBox.accepted.connect(self.accept)
122125
self.buttonBox.rejected.connect(self.close)
123126
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).clicked.connect(self.cancel)
124127
#~ QtCore.QMetaObject.connectSlotsByName(self)
@@ -207,7 +210,7 @@ def accept(self):
207210
if msg:
208211
QMessageBox.critical(self, "Unable to execute algorithm", msg)
209212
return
210-
self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(False)
213+
self.runButton.setEnabled(False)
211214
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(False)
212215
buttons = self.paramTable.iterateButtons
213216
self.iterateParam = None
@@ -321,7 +324,7 @@ def resetGUI(self):
321324
self.progressLabel.setText("")
322325
self.progress.setValue(100)
323326
#self.progress.setMaximum(100)
324-
self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True)
327+
self.runButton.setEnabled(True)
325328
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(True)
326329
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)
327330

python/plugins/sextante/gui/help/algclasssification.txt

+2
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ saga:polartocartesiancoordinates,USE_ORIGINAL_NAME,Domain specific/Cost analysis
308308
saga:polygon-lineintersection,USE_ORIGINAL_NAME,Vector/Geometry operations
309309
saga:polygoncentroids,USE_ORIGINAL_NAME,Vector/Polygons
310310
saga:polygondissolve,USE_ORIGINAL_NAME,Vector/Polygons
311+
saga:polygondissolvebyattribute,Polygon dissolve (by attribute),Vector/Polygons
312+
saga:polygondissolveallpolygons,Polygon dissolve (all polygons),Vector/Polygons
311313
saga:intersect,Polygon intersection,Vector/Polygons
312314
saga:difference,Polygon difference,Vector/Polygons
313315
saga:update,Polygon update,Vector/Polygons

python/plugins/sextante/saga/SagaAlgorithmProvider.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def createAlgsList(self):
7777
alg = SagaAlgorithm(os.path.join(folder, descriptionFile))
7878
if alg.name.strip() != "":
7979
self.preloadedAlgs.append(alg)
80-
else:
80+
print alg.name
81+
else:
8182
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile)
8283
except Exception,e:
8384
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile +"\n" + str(e))
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Polygon Dissolve
1+
Polygon dissolve (by attribute)|Polygon Dissolve
22
shapes_polygons
33
ParameterVector|POLYGONS|Polygons|2|False
44
ParameterTableField|FIELD_1|1. Attribute|POLYGONS|-1|True
55
ParameterTableField|FIELD_2|2. Attribute|POLYGONS|-1|True
66
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
7+
ParameterBoolean|BND_KEEP|Keep inner boundaries|True
8+
OutputVector|DISSOLVED|Dissolved Polygons
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Polygon dissolve (all polygons)|Polygon Dissolve
2+
shapes_polygons
3+
ParameterVector|POLYGONS|Polygons|2|False
4+
ParameterBoolean|BND_KEEP|Keep inner boundaries|True
5+
OutputVector|DISSOLVED|Dissolved Polygons

0 commit comments

Comments
 (0)