mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-04 00:06:46 -05:00
[sextante] minor fixes and algorithm changes
This commit is contained in:
parent
0667b94407
commit
afb6bd3b85
@ -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
|
||||
@ -70,9 +70,12 @@ class AlgorithmExecutionDialog(QtGui.QDialog):
|
||||
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)
|
||||
@ -118,7 +121,7 @@ class AlgorithmExecutionDialog(QtGui.QDialog):
|
||||
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)
|
||||
@ -207,7 +210,7 @@ class AlgorithmExecutionDialog(QtGui.QDialog):
|
||||
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
|
||||
@ -321,7 +324,7 @@ class AlgorithmExecutionDialog(QtGui.QDialog):
|
||||
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)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -77,7 +77,8 @@ class SagaAlgorithmProvider(AlgorithmProvider):
|
||||
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))
|
||||
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user