Skip to content
Permalink
Browse files

[processing] don't modify output filename in build virtual raster

  • Loading branch information
nirvn committed Jan 24, 2018
1 parent 746701b commit 5f5f1f9c0596681760b0f0cafb93847662c2a8e4
Showing with 0 additions and 11 deletions.
  1. +0 −11 python/plugins/processing/algs/gdal/buildvrt.py
@@ -123,17 +123,6 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments.append(listFile)

out = self.parameterAsOutputLayer(parameters, self.OUTPUT, context)
# Ideally the file extensions should be limited to just .vrt but I'm not sure how
# to do it simply so instead a check is performed.
_, ext = os.path.splitext(out)
if not ext.lower() == '.vrt':
out = out[:-len(ext)] + '.vrt'
if isinstance(parameters[self.OUTPUT], QgsProcessingOutputLayerDefinition):
output_def = QgsProcessingOutputLayerDefinition(parameters[self.OUTPUT])
output_def.sink = QgsProperty.fromValue(out)
self.setOutputValue(self.OUTPUT, output_def)
else:
self.setOutputValue(self.OUTPUT, out)
arguments.append(out)

return ['gdalbuildvrt', GdalUtils.escapeAndJoin(arguments)]

0 comments on commit 5f5f1f9

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