Skip to content
Permalink
Browse files

[gdaltools] allow multiple nodata valued in Build VRT tool (fix #11063)

  • Loading branch information
alexbruy committed Jan 18, 2016
1 parent 20bf738 commit c63d16a3b215aaf126031f5201388e18e0410ace
Showing with 42 additions and 43 deletions.
  1. +5 −3 python/plugins/GdalTools/tools/doBuildVRT.py
  2. +37 −40 python/plugins/GdalTools/tools/widgetBuildVRT.ui
@@ -52,7 +52,7 @@ def __init__(self, iface):
(self.inSelector, SIGNAL("filenameChanged()")),
(self.outSelector, SIGNAL("filenameChanged()")),
(self.resolutionComboBox, SIGNAL("currentIndexChanged(int)"), self.resolutionCheck),
(self.srcNoDataSpin, SIGNAL("valueChanged(int)"), self.srcNoDataCheck, 1700),
(self.noDataEdit, SIGNAL("textChanged( const QString & )"), self.srcNoDataCheck, 1700),
(self.inputDirCheck, SIGNAL("stateChanged(int)")),
(self.separateCheck, SIGNAL("stateChanged(int)"), None, 1700),
(self.targetSRSEdit, SIGNAL("textChanged(const QString &)"), self.targetSRSCheck),
@@ -145,8 +145,10 @@ def getArguments(self):
if self.separateCheck.isChecked():
arguments.append("-separate")
if self.srcNoDataCheck.isChecked():
arguments.append("-srcnodata")
arguments.append(str(self.srcNoDataSpin.value()))
nodata = self.noDataEdit.text().strip()
if nodata:
arguments.append("-srcnodata")
arguments.append(nodata)
if self.targetSRSCheck.isChecked() and self.targetSRSEdit.text():
arguments.append("-a_srs")
arguments.append(self.targetSRSEdit.text())
@@ -25,40 +25,26 @@
<property name="sizeConstraint">
<enum>QLayout::SetNoConstraint</enum>
</property>
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="inputSelLayersCheck">
<item row="10" column="0" colspan="2">
<widget class="QCheckBox" name="allowProjDiffCheck">
<property name="text">
<string>Use visible raster layers for input</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="GdalToolsInOutSelector" name="outSelector" native="true"/>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="srcNoDataSpin">
<property name="minimum">
<number>-100000</number>
</property>
<property name="maximum">
<number>65000</number>
<string>Allow projection difference</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="targetSRSCheck">
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Target SRS</string>
<string>&amp;Output file</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="srcNoDataCheck">
<property name="text">
<string>&amp;Source No Data</string>
<property name="buddy">
<cstring>outSelector</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="GdalToolsInOutSelector" name="inSelector" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
@@ -69,13 +55,10 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<item row="8" column="0">
<widget class="QCheckBox" name="separateCheck">
<property name="text">
<string>&amp;Output file</string>
</property>
<property name="buddy">
<cstring>outSelector</cstring>
<string>Se&amp;parate</string>
</property>
</widget>
</item>
@@ -86,23 +69,23 @@
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="separateCheck">
<item row="4" column="1">
<widget class="GdalToolsInOutSelector" name="outSelector" native="true"/>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="targetSRSCheck">
<property name="text">
<string>Se&amp;parate</string>
<string>Target SRS</string>
</property>
</widget>
</item>
<item row="10" column="0" colspan="2">
<widget class="QCheckBox" name="allowProjDiffCheck">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="inputSelLayersCheck">
<property name="text">
<string>Allow projection difference</string>
<string>Use visible raster layers for input</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="GdalToolsInOutSelector" name="inSelector" native="true"/>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="resolutionCheck">
<property name="text">
@@ -138,6 +121,13 @@
</item>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="srcNoDataCheck">
<property name="text">
<string>&amp;Source No Data</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="recurseCheck">
<property name="text">
@@ -159,6 +149,13 @@
</item>
</layout>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="noDataEdit">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>

0 comments on commit c63d16a

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