Skip to content

Commit 97dd304

Browse files
author
brushtyler
committed
added algorithm option to gdaldem
git-svn-id: http://svn.osgeo.org/qgis/trunk@15497 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b81d2af commit 97dd304

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

python/plugins/GdalTools/tools/doDEM.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def __init__(self, iface):
3535
(self.outputFileEdit, SIGNAL("textChanged(const QString &)")),
3636
(self.computeEdgesCheck, SIGNAL("stateChanged(int)"), None, "1.8.0"),
3737
(self.bandSpin, SIGNAL("valueChanged(int)"), self.bandCheck),
38+
(self.algorithmCheck, SIGNAL("stateChanged(int)"), None, "1.8.0"),
3839
(self.creationOptionsTable, [SIGNAL("cellValueChanged(int, int)"), SIGNAL("rowRemoved()")], self.creationGroupBox),
3940
(self.modeCombo, SIGNAL("currentIndexChanged(int)")),
4041
([self.hillshadeZFactorSpin, self.hillshadeScaleSpin, self.hillshadeAltitudeSpin, self.hillshadeAzimuthSpin], SIGNAL("valueChanged(double)")),
@@ -54,6 +55,9 @@ def __init__(self, iface):
5455

5556
def showModeParams(self, index):
5657
self.stackedWidget.setVisible( index < 4 )
58+
self.algorithmCheck.setVisible( index < 3 )
59+
if index >= 3:
60+
self.algorithmCheck.setChecked( False )
5761

5862
def onLayersChanged(self):
5963
self.fillInputLayerCombo()
@@ -120,6 +124,8 @@ def getArguments(self):
120124
arguments << "-exact_color_entry"
121125
elif self.colorNearestRadio.isChecked():
122126
arguments << "-nearest_color_entry"
127+
if self.algorithmCheck.isChecked():
128+
arguments << "-alg" << "ZevenbergenThorne"
123129
if self.computeEdgesCheck.isChecked():
124130
arguments << "-compute_edges"
125131
if self.bandCheck.isChecked():

python/plugins/GdalTools/tools/widgetDEM.ui

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>418</width>
10-
<height>408</height>
9+
<width>485</width>
10+
<height>437</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
@@ -104,14 +104,14 @@
104104
</property>
105105
</widget>
106106
</item>
107-
<item row="3" column="0">
107+
<item row="3" column="0" colspan="2">
108108
<widget class="QCheckBox" name="computeEdgesCheck">
109109
<property name="text">
110110
<string>Compute &amp;edges</string>
111111
</property>
112112
</widget>
113113
</item>
114-
<item row="4" column="0">
114+
<item row="5" column="0">
115115
<widget class="QLabel" name="label_3">
116116
<property name="text">
117117
<string>&amp;Mode</string>
@@ -121,7 +121,7 @@
121121
</property>
122122
</widget>
123123
</item>
124-
<item row="4" column="1">
124+
<item row="5" column="1">
125125
<widget class="QComboBox" name="modeCombo">
126126
<property name="sizePolicy">
127127
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@@ -169,6 +169,13 @@
169169
</item>
170170
</widget>
171171
</item>
172+
<item row="4" column="0" colspan="2">
173+
<widget class="QCheckBox" name="algorithmCheck">
174+
<property name="text">
175+
<string>Use Zevenbergen&amp;&amp;Thorne formula (instead of the Horn's one)</string>
176+
</property>
177+
</widget>
178+
</item>
172179
</layout>
173180
</item>
174181
<item>

0 commit comments

Comments
 (0)