diff --git a/python/plugins/GdalTools/tools/doContour.py b/python/plugins/GdalTools/tools/doContour.py index 8d179cdc07bc..f645ff247d2d 100644 --- a/python/plugins/GdalTools/tools/doContour.py +++ b/python/plugins/GdalTools/tools/doContour.py @@ -47,6 +47,8 @@ def __init__(self, iface): self.outSelector.setType(self.outSelector.FILE) + self.outputFormat = Utils.fillVectorOutputFormat() + # set the default QSpinBoxes value self.intervalDSpinBox.setValue(10.0) @@ -85,6 +87,7 @@ def fillOutputFileEdit(self): if not self.useDirAsOutput: Utils.FileFilter.setLastUsedVectorFilter(lastUsedFilter) + self.outputFormat = Utils.fillVectorOutputFormat(lastUsedFilter, outputFile) self.outSelector.setFilename(outputFile) self.lastEncoding = encoding @@ -96,8 +99,15 @@ def getArguments(self): if True: # XXX in this moment the -i argument is not optional arguments.append("-i") arguments.append(unicode(self.intervalDSpinBox.value())) + + outputFn = self.getOutputFileName() + if outputFn: + arguments.append("-f") + arguments.append(self.outputFormat) + arguments.append(self.getInputFileName()) arguments.append(self.outSelector.filename()) + return arguments def getInputFileName(self):