mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fixed #6619
This commit is contained in:
parent
8914e7d6ce
commit
5c887194ad
@ -88,7 +88,7 @@ class EditRScriptDialog(QtGui.QDialog):
|
||||
|
||||
def saveAlgorithm(self):
|
||||
if self.filename is None:
|
||||
self.filename = QtGui.QFileDialog.getSaveFileName(self, "Save Script", RUtils.RScriptsFolder(), "SEXTANTE R script (*.rsx)")
|
||||
self.filename = str(QtGui.QFileDialog.getSaveFileName(self, "Save Script", RUtils.RScriptsFolder(), "SEXTANTE R script (*.rsx)"))
|
||||
|
||||
if self.filename:
|
||||
if not self.filename.endswith(".rsx"):
|
||||
|
@ -43,7 +43,7 @@ class SplitRGBBands(GeoAlgorithm):
|
||||
return QtGui.QIcon(os.path.dirname(__file__) + "/../images/saga.png")
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name = "Split RGB band"
|
||||
self.name = "Split RGB bands"
|
||||
self.group = "Grid - Tools"
|
||||
self.addParameter(ParameterRaster(SplitRGBBands.INPUT, "Input layer", False))
|
||||
self.addOutput(OutputRaster(SplitRGBBands.R, "Output R band layer"))
|
||||
|
@ -88,7 +88,7 @@ class EditScriptDialog(QtGui.QDialog):
|
||||
|
||||
def saveAlgorithm(self):
|
||||
if self.filename is None:
|
||||
self.filename = QtGui.QFileDialog.getSaveFileName(self, "Save Script", ScriptUtils.scriptsFolder(), "Python scripts (*.py)")
|
||||
self.filename = str(QtGui.QFileDialog.getSaveFileName(self, "Save Script", ScriptUtils.scriptsFolder(), "Python scripts (*.py)"))
|
||||
|
||||
if self.filename:
|
||||
if not self.filename.endswith(".py"):
|
||||
|
@ -0,0 +1,11 @@
|
||||
##input=vector
|
||||
##cellsize=number 1000.0
|
||||
##grid=output vector
|
||||
from sextante.core.QGisLayers import QGisLayers
|
||||
|
||||
input = QGisLayers.getObjectFromUri(input)
|
||||
centerx = (input.extent().xMinimum() + input.extent().xMaximum()) / 2
|
||||
centery = (input.extent().yMinimum() + input.extent().yMaximum()) / 2
|
||||
width = (input.extent().xMaximum() - input.extent().xMinimum())
|
||||
height = (input.extent().yMaximum() - input.extent().yMinimum())
|
||||
Sextante.runalg("mmqgisx:creategrid", cellsize, cellsize, width, height, centerx, centery, 3, grid)
|
Loading…
x
Reference in New Issue
Block a user