Skip to content
Permalink
Browse files

[GDALTools] pass output format to gdal_contour (fix #6695)

  • Loading branch information
alexbruy committed Jun 21, 2016
1 parent 7eacd44 commit 803cbada1344773500f337464e9178c45b32f1c6
Showing with 10 additions and 0 deletions.
  1. +10 −0 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):

0 comments on commit 803cbad

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