Skip to content

Commit

Permalink
allow output size in grid tool to fix #2941
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15471 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Mar 14, 2011
1 parent 6d06ec3 commit a4e8e75
Show file tree
Hide file tree
Showing 4 changed files with 754 additions and 658 deletions.
11 changes: 10 additions & 1 deletion python/plugins/GdalTools/tools/doGrid.py
Expand Up @@ -20,6 +20,10 @@ def __init__(self, iface):
self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_grid")

# set the default QSpinBoxes and QProgressBar value
self.widthSpin.setValue(3000)
self.heightSpin.setValue(3000)

self.extentSelector.setCanvas(self.canvas)
#self.extentSelector.stop()

Expand All @@ -44,7 +48,8 @@ def __init__(self, iface):
(self.datametricsCombo, SIGNAL("currentIndexChanged(int)")),
([self.datametricsRadius1Spin, self.datametricsRadius2Spin, self.datametricsAngleSpin, self.datametricsNoDataSpin], SIGNAL("valueChanged(double)")),
(self.datametricsMinPointsSpin, SIGNAL("valueChanged(int)")),
(self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentGroup)
(self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentGroup),
( [self.widthSpin, self.heightSpin], SIGNAL( "valueChanged(int)" ), self.resizeGroupBox )
]
)

Expand Down Expand Up @@ -122,6 +127,10 @@ def getArguments(self):
if self.algorithmCheck.isChecked() and self.algorithmCombo.currentIndex() >= 0:
arguments << "-a"
arguments << self.algorithmArguments(self.algorithmCombo.currentIndex())
if self.resizeGroupBox.isChecked():
arguments << "-outsize"
arguments << str( self.widthSpin.value() )
arguments << str( self.heightSpin.value() )
if not self.outputFileEdit.text().isEmpty():
arguments << "-of"
arguments << self.outputFormat
Expand Down

0 comments on commit a4e8e75

Please sign in to comment.