Skip to content

Commit

Permalink
[GDALTools] pass output format to gdal_contour (fix #6695)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jun 21, 2016
1 parent c5e7a98 commit 6111bee
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/plugins/GdalTools/tools/doContour.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

Expand All @@ -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):
Expand Down

0 comments on commit 6111bee

Please sign in to comment.