Skip to content

Commit

Permalink
[sextante] minor fixes and algorithm changes
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Jul 14, 2013
1 parent 0667b94 commit afb6bd3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
Expand Up @@ -3,6 +3,6 @@ v.clean.advanced - Toolset for cleaning topology of vector map (Advanced).
Vector (v.*)
ParameterVector|input|Layer to clean|-1|False
ParameterString|tool|Cleaning tools (comma separated)|break
ParameterNumber|thresh|Threshold|None|None|0..1
ParameterNumber|thresh|Threshold|None|None|0.0001
OutputVector|output|Cleaned vector layer
OutputVector|error|Errors layer
13 changes: 8 additions & 5 deletions python/plugins/sextante/gui/AlgorithmExecutionDialog.py
Expand Up @@ -70,9 +70,12 @@ def __init__(self, alg, mainWidget):
self.buttonBox = QtGui.QDialogButtonBox()
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.Ok)
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Close)
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)

self.runButton = QtGui.QPushButton()
self.runButton.setText("Run")
self.buttonBox.addButton(self.runButton, QtGui.QDialogButtonBox.ActionRole)
self.runButton.clicked.connect(self.accept)
self.scrollArea = QtGui.QScrollArea()
if self.mainWidget:
self.scrollArea.setWidget(self.mainWidget)
Expand Down Expand Up @@ -118,7 +121,7 @@ def __init__(self, alg, mainWidget):
self.verticalLayout.addWidget(self.progress)
self.verticalLayout.addWidget(self.buttonBox)
self.setLayout(self.verticalLayout)
self.buttonBox.accepted.connect(self.accept)
#self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.close)
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).clicked.connect(self.cancel)
#~ QtCore.QMetaObject.connectSlotsByName(self)
Expand Down Expand Up @@ -207,7 +210,7 @@ def accept(self):
if msg:
QMessageBox.critical(self, "Unable to execute algorithm", msg)
return
self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(False)
self.runButton.setEnabled(False)
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(False)
buttons = self.paramTable.iterateButtons
self.iterateParam = None
Expand Down Expand Up @@ -321,7 +324,7 @@ def resetGUI(self):
self.progressLabel.setText("")
self.progress.setValue(100)
#self.progress.setMaximum(100)
self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True)
self.runButton.setEnabled(True)
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(True)
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)

Expand Down
2 changes: 2 additions & 0 deletions python/plugins/sextante/gui/help/algclasssification.txt
Expand Up @@ -308,6 +308,8 @@ saga:polartocartesiancoordinates,USE_ORIGINAL_NAME,Domain specific/Cost analysis
saga:polygon-lineintersection,USE_ORIGINAL_NAME,Vector/Geometry operations
saga:polygoncentroids,USE_ORIGINAL_NAME,Vector/Polygons
saga:polygondissolve,USE_ORIGINAL_NAME,Vector/Polygons
saga:polygondissolvebyattribute,Polygon dissolve (by attribute),Vector/Polygons
saga:polygondissolveallpolygons,Polygon dissolve (all polygons),Vector/Polygons
saga:intersect,Polygon intersection,Vector/Polygons
saga:difference,Polygon difference,Vector/Polygons
saga:update,Polygon update,Vector/Polygons
Expand Down
3 changes: 2 additions & 1 deletion python/plugins/sextante/saga/SagaAlgorithmProvider.py
Expand Up @@ -77,7 +77,8 @@ def createAlgsList(self):
alg = SagaAlgorithm(os.path.join(folder, descriptionFile))
if alg.name.strip() != "":
self.preloadedAlgs.append(alg)
else:
print alg.name
else:
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile)
except Exception,e:
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile +"\n" + str(e))
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/sextante/saga/description/PolygonDissolve.txt
@@ -1,8 +1,8 @@
Polygon Dissolve
Polygon dissolve (by attribute)|Polygon Dissolve
shapes_polygons
ParameterVector|POLYGONS|Polygons|2|False
ParameterTableField|FIELD_1|1. Attribute|POLYGONS|-1|True
ParameterTableField|FIELD_2|2. Attribute|POLYGONS|-1|True
ParameterTableField|FIELD_3|3. Attribute|POLYGONS|-1|True
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)
OutputVector|DISSOLVED|Dissolved Polygons
ParameterBoolean|BND_KEEP|Keep inner boundaries|True
OutputVector|DISSOLVED|Dissolved Polygons
@@ -0,0 +1,5 @@
Polygon dissolve (all polygons)|Polygon Dissolve
shapes_polygons
ParameterVector|POLYGONS|Polygons|2|False
ParameterBoolean|BND_KEEP|Keep inner boundaries|True
OutputVector|DISSOLVED|Dissolved Polygons

0 comments on commit afb6bd3

Please sign in to comment.