Skip to content

Commit 803cbad

Browse files
committed
[GDALTools] pass output format to gdal_contour (fix #6695)
1 parent 7eacd44 commit 803cbad

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

python/plugins/GdalTools/tools/doContour.py

+10
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ def __init__(self, iface):
4747

4848
self.outSelector.setType(self.outSelector.FILE)
4949

50+
self.outputFormat = Utils.fillVectorOutputFormat()
51+
5052
# set the default QSpinBoxes value
5153
self.intervalDSpinBox.setValue(10.0)
5254

@@ -85,6 +87,7 @@ def fillOutputFileEdit(self):
8587
if not self.useDirAsOutput:
8688
Utils.FileFilter.setLastUsedVectorFilter(lastUsedFilter)
8789

90+
self.outputFormat = Utils.fillVectorOutputFormat(lastUsedFilter, outputFile)
8891
self.outSelector.setFilename(outputFile)
8992
self.lastEncoding = encoding
9093

@@ -96,8 +99,15 @@ def getArguments(self):
9699
if True: # XXX in this moment the -i argument is not optional
97100
arguments.append("-i")
98101
arguments.append(unicode(self.intervalDSpinBox.value()))
102+
103+
outputFn = self.getOutputFileName()
104+
if outputFn:
105+
arguments.append("-f")
106+
arguments.append(self.outputFormat)
107+
99108
arguments.append(self.getInputFileName())
100109
arguments.append(self.outSelector.filename())
110+
101111
return arguments
102112

103113
def getInputFileName(self):

0 commit comments

Comments
 (0)