Skip to content
Permalink
Browse files

Fixed #6619

  • Loading branch information
volaya committed Nov 11, 2012
1 parent 8914e7d commit 5c887194ad45be58a1c69865eb4f86ed9209411f
@@ -88,7 +88,7 @@ def editHelp(self):

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 @@ def getIcon(self):
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 @@ def editHelp(self):

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)

0 comments on commit 5c88719

Please sign in to comment.
You can’t perform that action at this time.