Skip to content

Commit a4e8e75

Browse files
author
brushtyler
committed
allow output size in grid tool to fix #2941
git-svn-id: http://svn.osgeo.org/qgis/trunk@15471 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6d06ec3 commit a4e8e75

File tree

4 files changed

+754
-658
lines changed

4 files changed

+754
-658
lines changed

python/plugins/GdalTools/tools/doGrid.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ def __init__(self, iface):
2020
self.setupUi(self)
2121
BasePluginWidget.__init__(self, self.iface, "gdal_grid")
2222

23+
# set the default QSpinBoxes and QProgressBar value
24+
self.widthSpin.setValue(3000)
25+
self.heightSpin.setValue(3000)
26+
2327
self.extentSelector.setCanvas(self.canvas)
2428
#self.extentSelector.stop()
2529

@@ -44,7 +48,8 @@ def __init__(self, iface):
4448
(self.datametricsCombo, SIGNAL("currentIndexChanged(int)")),
4549
([self.datametricsRadius1Spin, self.datametricsRadius2Spin, self.datametricsAngleSpin, self.datametricsNoDataSpin], SIGNAL("valueChanged(double)")),
4650
(self.datametricsMinPointsSpin, SIGNAL("valueChanged(int)")),
47-
(self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentGroup)
51+
(self.extentSelector, [SIGNAL("selectionStarted()"), SIGNAL("newExtentDefined()")], self.extentGroup),
52+
( [self.widthSpin, self.heightSpin], SIGNAL( "valueChanged(int)" ), self.resizeGroupBox )
4853
]
4954
)
5055

@@ -122,6 +127,10 @@ def getArguments(self):
122127
if self.algorithmCheck.isChecked() and self.algorithmCombo.currentIndex() >= 0:
123128
arguments << "-a"
124129
arguments << self.algorithmArguments(self.algorithmCombo.currentIndex())
130+
if self.resizeGroupBox.isChecked():
131+
arguments << "-outsize"
132+
arguments << str( self.widthSpin.value() )
133+
arguments << str( self.heightSpin.value() )
125134
if not self.outputFileEdit.text().isEmpty():
126135
arguments << "-of"
127136
arguments << self.outputFormat

0 commit comments

Comments
 (0)